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

ENH: Add --config option to supersed some or all of the options #1

Open
kikocorreoso opened this issue May 20, 2016 · 1 comment
Open

Comments

@kikocorreoso
Copy link
Member

kikocorreoso commented May 20, 2016

Add a new --config option to the command line in order to avoid the repetitive use of some of the ther options. For instance, instead of this:

python -m jupy2wp.jupy2wp --xmlrpc-url http://pybonacci.org/xmlrpc.php --user kiko --password 1_2_oh_my_god!!! --nb 'dummy.ipynb' --title 'The best post ever' --categories articles tutorials --tags strawberry lucy jupyter --template basicx

Replace some of the options with a config.py including hardcoded options that are not expected to change for a user like --xmlrpc'',--user,--password,--template` so yu can use something like:

python -m jupy2wp.jupy2wp --config /path/to/config.py --nb 'dummy.ipynb' --title 'The best post ever' --categories articles tutorials --tags strawberry lucy jupyter

Hint: http://stackoverflow.com/questions/301134/dynamic-module-import-in-python/301146#301146

@astrojuanlu
Copy link
Member

Instead of config.py one could use this:

https://docs.python.org/3.5/library/configparser.html

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

No branches or pull requests

2 participants