Update README

This commit is contained in:
jaseg 2022-12-31 23:09:14 +01:00
parent ad87eedf6b
commit 9d5fff7dba
2 changed files with 14 additions and 6 deletions

View file

@ -11,9 +11,12 @@ pip install -r requirements.txt
### Usage
```
usage: html_diff.py [-h] [-b] [-s SYNTAX_CSS] [-t PAGETITLE] [-o OUTPUT] [--header] [--content] old new
usage: html_diff.py [-h] [-b] [-s SYNTAX_CSS] [-l LEXER] [-L] [-t PAGETITLE]
[-o OUTPUT] [--header] [--content]
[old] [new]
Given two source files or directories this applicationcreates an html page which highlights the differences between the two.
Given two source files or directories this application creates an html page
that highlights the differences between the two.
positional arguments:
old source file or directory to compare ("before" file)
@ -23,12 +26,18 @@ options:
-h, --help show this help message and exit
-b, --open Open output file in a browser
-s SYNTAX_CSS, --syntax-css SYNTAX_CSS
Path to custom Pygments CSS file for code syntax highlighting
Path to custom Pygments CSS file for code syntax
highlighting
-l LEXER, --lexer LEXER
Manually select pygments lexer (default: guess from
filename, use -L to list available lexers.)
-L, --list-lexers List available lexers for -l/--lexer
-t PAGETITLE, --pagetitle PAGETITLE
Override page title of output HTML file
-o OUTPUT, --output OUTPUT
Name of output file (default: stdout)
--header Only output HTML header with stylesheets and stuff, and no diff
--header Only output HTML header with stylesheets and stuff,
and no diff
--content Only output HTML content, without header
```
### Example Output

View file

@ -640,8 +640,7 @@ def html_diff_block(old, new, filename, lexer):
if __name__ == "__main__":
description = """Given two source files or directories this application\
creates an html page which highlights the differences between the two. """
description = "Given two source files or directories this application creates an html page that highlights the differences between the two."
parser = argparse.ArgumentParser(description=description)
parser.add_argument('-b', '--open', action='store_true', help='Open output file in a browser')