aboutsummaryrefslogtreecommitdiff
path: root/pixelterm
diff options
context:
space:
mode:
authorjaseg <jaseg@jaseg.net>2014-01-12 18:55:37 +0100
committerjaseg <jaseg@jaseg.net>2014-01-12 18:59:14 +0100
commit74379648d3a1442d5811cca47bb82f5d9db1ba4d (patch)
tree7f8c46af76512e3043216ee56c7608947635cd56 /pixelterm
parent49a999f44bde9e0fbfd3b57c2a60ac65869b2da3 (diff)
downloadpixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.tar.gz
pixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.tar.bz2
pixelterm-74379648d3a1442d5811cca47bb82f5d9db1ba4d.zip
Terminal size override fix.
Diffstat (limited to 'pixelterm')
-rw-r--r--pixelterm/__init__.py1
-rwxr-xr-xpixelterm/gifterm.py6
-rwxr-xr-x[-rw-r--r--]pixelterm/pixelterm.py0
3 files changed, 5 insertions, 2 deletions
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