Changeset 115 for trunk/bin/bletchley-analyze
- Timestamp:
- 10/06/16 21:10:15 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/bletchley-analyze
r77 r115 44 44 parser.add_argument('-p', dest='output_lines', type=int, default=10, 45 45 help='Number of lines of input to display in decoded form.') 46 parser.add_argument('-C', action='store_const', const=True, default=False, 47 help='Use mono output for decoded highlights.') 46 48 parser.add_argument('-c', action='store_const', const=True, default=False, 47 help='Use color output for decoded highlights.')48 parser.add_argument('-c256', action='store_const', const=True, default= False,49 help='Use 256 color output for decoded highlights. ')49 help='Use 8 color output for decoded highlights.') 50 parser.add_argument('-c256', action='store_const', const=True, default=True, 51 help='Use 256 color output for decoded highlights. (default)') 50 52 options = parser.parse_args() 51 53 … … 66 68 return s 67 69 68 if options.c256: 69 fg = code%216+16 70 bg = (code^0xffffffff)%216+16 71 return "\x1b[0;38;05;%d;48;05;%dm%s\x1b[0m" % (fg,bg,s) 70 if options.C: 71 return "\x1b[7m%s\x1b[0m" % s 72 72 elif options.c: 73 73 fg = code%6+31 … … 75 75 return "\x1b[0;%d;%dm%s\x1b[0m" % (fg,bg,s) 76 76 else: 77 return "\x1b[7m%s\x1b[0m" % s 77 fg = code%216+16 78 bg = (code^0xffffffff)%216+16 79 return "\x1b[0;38;05;%d;48;05;%dm%s\x1b[0m" % (fg,bg,s) 78 80 79 81
Note: See TracChangeset
for help on using the changeset viewer.