Skip to content

Commit

Permalink
Support "source" parameter for get_content
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbradshaw committed Oct 4, 2024
1 parent 36a7a3e commit 2207cdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Several options are available. Some are only applicable to certain commands.

- **lang** (optional) – Output language. BCP 47 language codes and Gospel Library language codes are supported. Default: 'en'.
- **separator** (optional) – String separator between outputs when a list of references is being requested. Default: '\n'.
- **source** (optional) – Content source. Default: 'python-scripture-scraper'. Supported values: 'python-scripture-scraper' or 'ChurchofJesusChrist.org'.
- **link_class** (optional) – String for the “class” attribute on links. Default: None.
- **link_target** (optional) – String for the “target” attribute on links. Default: None.
- **use_query_parameters** (optional) – Whether query parameters should be used on URIs. Default: False.
Expand Down
2 changes: 2 additions & 0 deletions src/scripturelookup/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def main_cli():
parser.add_argument('input', help='Input text to parse (one or more references).')
parser.add_argument('--lang', help='Output language. Default: "en".')
parser.add_argument('--separator', help='Separator when there are multiple results. Default: "\n".')
parser.add_argument('--source', help='Content source ("python-scripture-scraper" or "ChurchofJesusChrist.org"). Default: "python-scripture-scraper".')
parser.add_argument('--link_class', help='Link "class" attribute.')
parser.add_argument('--link_target', help='Link "target" attribute.')
parser.add_argument('--use_query_parameters', action='store_true', help='Use "id" and "context" parameters in URIs.')
Expand All @@ -25,6 +26,7 @@ def main_cli():
args.input,
lang = args.lang or 'en',
separator = args.separator or '\n',
source = args.source or 'python-scripture-scraper',
link_class = args.link_class,
link_target = args.link_target,
use_query_parameters = args.use_query_parameters,
Expand Down

0 comments on commit 2207cdd

Please sign in to comment.