Page MenuHomePhabricator

parse.js should have standard arguments
Open, LowPublic

Description

There are some weirdnesses wrt parse.js command-line options that are surprising to new users... and occasionally to long-term devs as well, since the CLI options for parse.js have been added piecemeal by various developers at different times and perhaps no single one of us actually understands/uses all of them.

Here are some things we could imagine fixing (not all of these options are consistent with each other, there are some choices to make):

  • The behavior of --page wrt /dev/null is unusual. We could:
    • Accept an input filename as a required argument, and accept - to indicate "from standard in". This is the unix convention.
    • Default to not accepting input from stdin, and require -i to opt-in to the stdin magic.
    • Split --page from --title (title is the parameter name usually used in our APIs to indicate the page title independent of a fetch). --page would do the fetch (removing the /dev/null stdin magic) and --title would just set the page title.
  • Accept shortnames for arguments. For example:
    • -f for --inputfile
    • -v for some default useful combination of debugging flags (and -vv, -vvv potentially too)
    • -d for --debug

Other ideas?

Event Timeline

cscott created this task.Oct 24 2017, 3:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 24 2017, 3:25 PM
ssastry triaged this task as Low priority.Nov 6 2017, 4:30 PM