Closed fgallaire closed 6 years ago
Or, splitting into subcommands as in pelican-import wordpress [wordpress specific options only]
as is done on e.g. Git.
I think changing the command line interface on something like this that's more of an occasional-use tool is less of a big deal than it might be for a main-line type tool.
Also, with the options broken up as above, the help's a lot more helpful which eases any pain.
Or, splitting into subcommands as in pelican-import wordpress [wordpress specific options only] as is done on e.g. Git.
I agree, or at least a --target wordpress
option instead of --wpfile --dotclear --posterous --tumblr
flags
I think changing the command line interface on something like this that's more of an occasional-use tool is less of a big deal than it might be for a main-line type tool.
I agree
So...next step would be to take what's there and write a proposed new command line interface.
I realize it's a big change, but I've found this helpful while thinking through CLIs and, when you've got agreement that it's right, you're pretty much done except for a bit of plumbing: http://docopt.org/
@ssteinerx docopt is really great for little projects, but doesn't fit with big i18ed projects as Pelican... should be?
@fgallaire No opinion on that, have never i18n'd a command line util and don't know how important that might be but docopt sure is handy in situations where you need approval before coding.
argparse
can do all of that, not as neatly as docopt but still. And I'd prefer not introducing new dependencies, especially for a one-off side tool.
Given the discussion here, what do folks think should be done about it?
Closing due to inactivity. If someone wants to propose something in the form of a pull request, please feel free to do so.
pelican-import
has a lot of options but you can only use few of them according to your source:-b BLOGNAME
is Tumblr only--dir-page
is WordPress only-e EMAIL
is Posterous only-p PASSWORD
is Posterous onlyIt's quite confusing, specially for the short options which usually are very important ones. Renaming with a prefix will be a good improvement.