diff options
author | jaseg <jaseg@jaseg.net> | 2014-01-12 18:55:37 +0100 |
---|---|---|
committer | jaseg <jaseg@jaseg.net> | 2014-01-12 18:59:14 +0100 |
commit | 74379648d3a1442d5811cca47bb82f5d9db1ba4d (patch) | |
tree | 7f8c46af76512e3043216ee56c7608947635cd56 | |
parent | 49a999f44bde9e0fbfd3b57c2a60ac65869b2da3 (diff) | |
download | pixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.tar.gz pixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.tar.bz2 pixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.zip |
Terminal size override fix.
-rw-r--r-- | packaging/PKGBUILD | 4 | ||||
-rw-r--r-- | pixelterm/__init__.py | 1 | ||||
-rwxr-xr-x | pixelterm/gifterm.py | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | pixelterm/pixelterm.py | 0 | ||||
-rwxr-xr-x | setup.py | 45 |
5 files changed, 32 insertions, 24 deletions
diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index 5be9b8f..23fc5b3 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: jaseg <arch@jaseg.net> -pkgname=pixelterm-jaseg-git -pkgver=0.52.6a1f990 +pkgname=pixelterm-git +pkgver=0.54.af9ab13 pkgrel=1 pkgdesc="Display images on a terminal. Even works with animated GIFs" arch=('any') diff --git a/pixelterm/__init__.py b/pixelterm/__init__.py index e69de29..8692824 100644 --- a/pixelterm/__init__.py +++ b/pixelterm/__init__.py @@ -0,0 +1 @@ +__all__ = ['xtermcolors', 'pixelterm'] diff --git a/pixelterm/gifterm.py b/pixelterm/gifterm.py index 85c0428..0ebded1 100755 --- a/pixelterm/gifterm.py +++ b/pixelterm/gifterm.py @@ -14,10 +14,12 @@ def main(): parser.add_argument('-s', '--size', type=str, help='Terminal size, [W]x[H]') args = parser.parse_args() - tw, th = os.get_terminal_size() - th = th*2 + tw, th = None, None if args.size: tw, th = map(int, args.size.split('x')) + else: + tw, th = os.get_terminal_size() + th = th*2 img = Image.open(args.image) palette = img.getpalette() diff --git a/pixelterm/pixelterm.py b/pixelterm/pixelterm.py index dccd788..dccd788 100644..100755 --- a/pixelterm/pixelterm.py +++ b/pixelterm/pixelterm.py @@ -4,26 +4,31 @@ from setuptools import setup import os, os.path import sys -ver = "1.1" +ver = "1.2" def read(filename): - return open(os.path.join(os.path.dirname(__file__), filename)).read() + return open(os.path.join(os.path.dirname(__file__), filename)).read() if sys.version_info < (3,0): - print('Oops, only python >= 3.0 supported!') - sys.exit() + print('Oops, only python >= 3.0 supported!') + sys.exit() setup(name = 'pixelterm', - version = ver, - description = 'Render pixely images on your terminal. Now also with animated GIF support.', - license = 'BSD', - author = 'jaseg', - author_email = 'pixelterm@jaseg.net', - url = 'https://github.com/jaseg/pixelterm', + version = ver, + description = 'Render pixely images on your terminal. Now also with animated GIF support.', + license = 'BSD', + author = 'jaseg', + author_email = 'pixelterm@jaseg.net', + url = 'https://github.com/jaseg/pixelterm', packages = ['pixelterm'], - install_requires=['pillow'], + install_requires=['pillow'], + scripts = [ 'pixelterm/pixelterm.py', + 'pixelterm/unpixelterm.py', + 'pixelterm/gifterm.py', + 'pixelterm/colorcube.py', + 'pixelterm/resolvecolor.py'], entry_points = {'console_scripts': [ 'pixelterm=pixelterm.pixelterm:main', 'unpixelterm=pixelterm.unpixelterm:main', @@ -31,22 +36,22 @@ setup(name = 'pixelterm', 'colorcube=pixelterm.colorcube:main', 'resolvecolor=pixelterm.resolvecolor:main', 'pngmeta=pixelterm.pngmeta:main']}, - zip_safe = True, - classifiers = [ + zip_safe = True, + classifiers = [ 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Information Technology', + 'Environment :: Console', + 'Intended Audience :: Information Technology', 'Intended Audience :: Intended Audience :: End Users/Desktop', 'License :: Freely Distributable', 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3', 'Topic :: Internet', 'Topic :: Graphics', - 'Topic :: System :: Networking' + 'Topic :: System :: Networking' 'Topic :: Text Processing :: Filters', 'Topic :: Utilities', - ], + ], - long_description = read('README.md'), - dependency_links = [], + long_description = read('README.md'), + dependency_links = [], ) |