Terminal size override fix.
This commit is contained in:
parent
49a999f44b
commit
74379648d3
5 changed files with 32 additions and 24 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: jaseg <arch@jaseg.net>
|
# Maintainer: jaseg <arch@jaseg.net>
|
||||||
|
|
||||||
pkgname=pixelterm-jaseg-git
|
pkgname=pixelterm-git
|
||||||
pkgver=0.52.6a1f990
|
pkgver=0.54.af9ab13
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Display images on a terminal. Even works with animated GIFs"
|
pkgdesc="Display images on a terminal. Even works with animated GIFs"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = ['xtermcolors', 'pixelterm']
|
||||||
|
|
@ -14,10 +14,12 @@ def main():
|
||||||
parser.add_argument('-s', '--size', type=str, help='Terminal size, [W]x[H]')
|
parser.add_argument('-s', '--size', type=str, help='Terminal size, [W]x[H]')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
tw, th = os.get_terminal_size()
|
tw, th = None, None
|
||||||
th = th*2
|
|
||||||
if args.size:
|
if args.size:
|
||||||
tw, th = map(int, args.size.split('x'))
|
tw, th = map(int, args.size.split('x'))
|
||||||
|
else:
|
||||||
|
tw, th = os.get_terminal_size()
|
||||||
|
th = th*2
|
||||||
|
|
||||||
img = Image.open(args.image)
|
img = Image.open(args.image)
|
||||||
palette = img.getpalette()
|
palette = img.getpalette()
|
||||||
|
|
|
||||||
0
pixelterm/pixelterm.py
Normal file → Executable file
0
pixelterm/pixelterm.py
Normal file → Executable file
45
setup.py
45
setup.py
|
|
@ -4,26 +4,31 @@ from setuptools import setup
|
||||||
import os, os.path
|
import os, os.path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
ver = "1.1"
|
ver = "1.2"
|
||||||
|
|
||||||
def read(filename):
|
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):
|
if sys.version_info < (3,0):
|
||||||
print('Oops, only python >= 3.0 supported!')
|
print('Oops, only python >= 3.0 supported!')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
setup(name = 'pixelterm',
|
setup(name = 'pixelterm',
|
||||||
version = ver,
|
version = ver,
|
||||||
description = 'Render pixely images on your terminal. Now also with animated GIF support.',
|
description = 'Render pixely images on your terminal. Now also with animated GIF support.',
|
||||||
license = 'BSD',
|
license = 'BSD',
|
||||||
author = 'jaseg',
|
author = 'jaseg',
|
||||||
author_email = 'pixelterm@jaseg.net',
|
author_email = 'pixelterm@jaseg.net',
|
||||||
url = 'https://github.com/jaseg/pixelterm',
|
url = 'https://github.com/jaseg/pixelterm',
|
||||||
packages = ['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': [
|
entry_points = {'console_scripts': [
|
||||||
'pixelterm=pixelterm.pixelterm:main',
|
'pixelterm=pixelterm.pixelterm:main',
|
||||||
'unpixelterm=pixelterm.unpixelterm:main',
|
'unpixelterm=pixelterm.unpixelterm:main',
|
||||||
|
|
@ -31,22 +36,22 @@ setup(name = 'pixelterm',
|
||||||
'colorcube=pixelterm.colorcube:main',
|
'colorcube=pixelterm.colorcube:main',
|
||||||
'resolvecolor=pixelterm.resolvecolor:main',
|
'resolvecolor=pixelterm.resolvecolor:main',
|
||||||
'pngmeta=pixelterm.pngmeta:main']},
|
'pngmeta=pixelterm.pngmeta:main']},
|
||||||
zip_safe = True,
|
zip_safe = True,
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Intended Audience :: Information Technology',
|
'Intended Audience :: Information Technology',
|
||||||
'Intended Audience :: Intended Audience :: End Users/Desktop',
|
'Intended Audience :: Intended Audience :: End Users/Desktop',
|
||||||
'License :: Freely Distributable',
|
'License :: Freely Distributable',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Topic :: Internet',
|
'Topic :: Internet',
|
||||||
'Topic :: Graphics',
|
'Topic :: Graphics',
|
||||||
'Topic :: System :: Networking'
|
'Topic :: System :: Networking'
|
||||||
'Topic :: Text Processing :: Filters',
|
'Topic :: Text Processing :: Filters',
|
||||||
'Topic :: Utilities',
|
'Topic :: Utilities',
|
||||||
],
|
],
|
||||||
|
|
||||||
long_description = read('README.md'),
|
long_description = read('README.md'),
|
||||||
dependency_links = [],
|
dependency_links = [],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue