Skip to content
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

Help when specifying multiple WARC files to indexer is confusing #95

Open
machawk1 opened this issue Feb 1, 2017 · 0 comments
Open

Comments

@machawk1
Copy link
Member

machawk1 commented Feb 1, 2017

ipwb index --help returns:

usage: ipwb [-h] [-e] [-c] [--compressFirst] [--debug]
            index <warcPath> [index <warcPath> ...]

This is likely attributed to the indexer's argument parser. Changing the culprit line:

indexParser.add_argument(
       'warcPath',
       help="Path to a WARC[.gz] file",
       metavar="index <warcPath>",
       nargs='+',
       default=None)

to:

indexParser.add_argument(
       'warcPath',
       help="Path to a WARC[.gz] file",
       metavar="index <warcPath>",
       nargs='3',
       default=None)

produces:

usage: ipwb [-h] [-e] [-c] [--compressFirst] [--debug]
            index <warcPath> index <warcPath> index <warcPath>

From the first snippet above, we want to accept multiple WARCs but not convey that index is required before each one. Changing nargs to 1 prevents correct parsing of multiple WARC files as specified when invoked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant