Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions diff2HtmlCompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,19 @@ def show(outputpath):
parser.add_argument('-p', '--print-width', action='store_true',
help='Restrict code to 80 columns wide. (printer friendly in landscape)')
parser.add_argument('-c', '--syntax-css', action='store', default="vs",
help='Pygments CSS for code syntax highlighting. Can be one of: %s' % str(PYGMENTS_STYLES))
help='Pygments CSS for code syntax highlighting. Can be one of: %s' % str(PYGMENTS_STYLE S))
parser.add_argument('-v', '--verbose', action='store_true', help='show verbose output.')
parser.add_argument('-o', "--output", action="store", help="Output file location")
parser.add_argument('file1', help='source file to compare ("before" file).')
parser.add_argument('file2', help='source file to compare ("after" file).')

args = parser.parse_args()


if args.output is None:
outputpath = "index.html"
else:
outputpath = str(args.output) if str(args.output).endswith(".html") else str(args.output + '.html')

if args.syntax_css not in PYGMENTS_STYLES:
raise ValueError("Syntax CSS (-c) must be one of %r." % PYGMENTS_STYLES)

Expand Down