summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-12-31 23:09:14 +0100
committerjaseg <git@jaseg.de>2022-12-31 23:09:14 +0100
commit9d5fff7dba42d03d4f6f94d40139cf3dd91c3c52 (patch)
treef02ef9bc9b6ec7e31ca8700b1731ff963dba701d
parentad87eedf6bcf0699a70e16e4f02992312af8c6ef (diff)
downloadwsdiff-9d5fff7dba42d03d4f6f94d40139cf3dd91c3c52.tar.gz
wsdiff-9d5fff7dba42d03d4f6f94d40139cf3dd91c3c52.tar.bz2
wsdiff-9d5fff7dba42d03d4f6f94d40139cf3dd91c3c52.zip
Update README
-rw-r--r--README.md17
-rw-r--r--html_diff.py3
2 files changed, 14 insertions, 6 deletions
diff --git a/README.md b/README.md
index 49de246..3216fab 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/html_diff.py b/html_diff.py
index b0ac959..0cf9b5c 100644
--- a/html_diff.py
+++ b/html_diff.py
@@ -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')