Update README
This commit is contained in:
parent
ad87eedf6b
commit
9d5fff7dba
2 changed files with 14 additions and 6 deletions
17
README.md
17
README.md
|
|
@ -11,9 +11,12 @@ pip install -r requirements.txt
|
||||||
|
|
||||||
### Usage
|
### 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:
|
positional arguments:
|
||||||
old source file or directory to compare ("before" file)
|
old source file or directory to compare ("before" file)
|
||||||
|
|
@ -23,12 +26,18 @@ options:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-b, --open Open output file in a browser
|
-b, --open Open output file in a browser
|
||||||
-s SYNTAX_CSS, --syntax-css SYNTAX_CSS
|
-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
|
-t PAGETITLE, --pagetitle PAGETITLE
|
||||||
Override page title of output HTML file
|
Override page title of output HTML file
|
||||||
-o OUTPUT, --output OUTPUT
|
-o OUTPUT, --output OUTPUT
|
||||||
Name of output file (default: stdout)
|
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
|
--content Only output HTML content, without header
|
||||||
```
|
```
|
||||||
### Example Output
|
### Example Output
|
||||||
|
|
|
||||||
|
|
@ -640,8 +640,7 @@ def html_diff_block(old, new, filename, lexer):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
description = """Given two source files or directories this application\
|
description = "Given two source files or directories this application creates an html page that highlights the differences between the two."
|
||||||
creates an html page which highlights the differences between the two. """
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description=description)
|
parser = argparse.ArgumentParser(description=description)
|
||||||
parser.add_argument('-b', '--open', action='store_true', help='Open output file in a browser')
|
parser.add_argument('-b', '--open', action='store_true', help='Open output file in a browser')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue