From 62e62f1eace5899d0176ef0dd1b66c6ef72f7ab0 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 29 Jul 2013 18:38:13 +0200 Subject: Cobbled together a setup.py --- Makefile | 17 ----------------- colorcube.py | 2 ++ resolvecolor.py | 2 ++ 3 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 98d8ec7..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ - -PREFIX?=/usr/local - -install: - install -m 0755 pixelterm.py $(PREFIX)/bin/pixelterm - install -m 0755 gifterm.py $(PREFIX)/bin/gifterm - install -m 0755 unpixelterm.py $(PREFIX)/bin/unpixelterm - install -m 0755 pngmeta.py $(PREFIX)/bin/pngmeta - -uninstall: - rm $(PREFIX)/bin/pixelterm - rm $(PREFIX)/bin/gifterm - rm $(PREFIX)/bin/unpixelterm - rm $(PREFIX)/bin/pngmeta - -reinstall: uninstall install - diff --git a/colorcube.py b/colorcube.py index dc84e2e..ebf36b9 100755 --- a/colorcube.py +++ b/colorcube.py @@ -2,6 +2,8 @@ import os, sys, argparse, os.path, json +# Display an xterm-256color color palette on the terminal, including color ids + reset_sequence = '\033[39;49m' def esc(i): diff --git a/resolvecolor.py b/resolvecolor.py index 9f1b181..7dc6537 100755 --- a/resolvecolor.py +++ b/resolvecolor.py @@ -5,6 +5,8 @@ from pygments.formatters import terminal256 formatter = terminal256.Terminal256Formatter() +# Resolve HTML-style hex RGB color codes to xterm-256color color numbers + if len(sys.argv) != 2: print('Usage: resolvecolor.py #RRGGBB') exit() -- cgit