You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="use to produce HTML safe output within <doc>...</doc>")
This means that any parameter is converted to string, and then evaluates as true unless empty. One simple way of correctly defining a boolean argument with default true value would be:
parser.add_argument("--html-safe", default=True, action=argparse.BooleanOptionalAction,
help="use to produce HTML safe output within <doc>...</doc>")
This way the parser would accept both --html-safe and --no-html-safe and also generate appropriate help.
The text was updated successfully, but these errors were encountered:
Due to a bug, the only way to turn off the --html-safe command line option is passing an empty argument (that evaluates as false in Python) like this:
wikiextractor --html-safe ""
The following does not work :
wikiextractor --no-html-safe
wikiextractor --html-safe false
The argument is currently defined like this:
wikiextractor/wikiextractor/WikiExtractor.py
Lines 560 to 561 in f0ca16c
This means that any parameter is converted to string, and then evaluates as true unless empty. One simple way of correctly defining a boolean argument with default true value would be:
This way the parser would accept both
--html-safe
and--no-html-safe
and also generate appropriate help.The text was updated successfully, but these errors were encountered: