Page MenuHomePhabricator

Using pywikibot as a library
Closed, DuplicatePublic


I want to make a script and host it on pypi. To do this, I was thinking the user would need to do something like:

$ pip install my_script_name
$ my_script_name -cat:SomeCategory -limit:10

Now, I can add pywikibot as a install_requires and pip will install it for me. But there is no nice way for me to create the file. I get an error that it's not found, and asking me to run pwb or make a PYWIKIBOT2_DIR - but a user who isn't used to pywikibot will get confused.

I was thinking it may be a good idea to make into an console entry_point so that the error message is simplified to "Run $ generate_pywikibot_user_files to create a user-config".