Skip to content

Minor documentation edits #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
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: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The inscript.py command line client supports the following parameters::
-l, --display-link-targets
Display link targets (default:false).
-a, --display-anchor-urls
Deduplicate image captions (default:false).
Display anchor urls (default:false).
-r ANNOTATION_RULES, --annotation-rules ANNOTATION_RULES
Path to an optional JSON file containing rules for annotating the retrieved text.
-p POSTPROCESSOR, --postprocessor POSTPROCESSOR
Expand All @@ -172,14 +172,16 @@ convert the file to text and save the output to output.txt::

convert HTML provided via stdin and save the output to output.txt::

$ echo '<body><p>Make it so!</p>></body>' | inscript.py -o output.txt
$ echo '<body><p>Make it so!</p></body>' | inscript.py -o output.txt


HTML to annotated text conversion
---------------------------------
convert and annotate HTML from a Web page using the provided annotation rules::
convert and annotate HTML from a Web page using the provided annotation rules.

Download the example `annotation-profile.json <https://github.com/weblyzard/inscriptis/blob/master/examples/annotation-profile.json>`_ and save it to your working directory::

$ inscript.py https://www.fhgr.ch -r ./examples/annotation-profile.json
$ inscript.py https://www.fhgr.ch -r annotation-profile.json

The annotation rules are specified in `annotation-profile.json`:

Expand Down
2 changes: 1 addition & 1 deletion scripts/inscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_parser():
help='Display link targets (default:false).')
parser.add_argument('-a', '--display-anchor-urls',
action='store_true', default=False,
help='Deduplicate image captions (default:false).')
help='Display anchor urls (default:false).')
parser.add_argument('-r', '--annotation-rules', default=None,
help='Path to an optional JSON file containing rules '
'for annotating the retrieved text.')
Expand Down