Page MenuHomePhabricator

Using pywikibot as a library
Open, LowPublic

Description

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 user-config.py 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 generate_user_files.py into an console entry_point so that the error message is simplified to "Run $ generate_pywikibot_user_files to create a user-config".

Event Timeline

AbdealiJK created this task.Jul 1 2016, 5:19 AM
Restricted Application added subscribers: pywikibot-bugs-list, Zppix, Aklapper. · View Herald TranscriptJul 1 2016, 5:19 AM
Xqt triaged this task as Low priority.Apr 25 2018, 3:32 PM