Mpaa added a comment.
Or make a script with your path selection logic, that generate the needed command string "python pwb.py projects/wikidatafix/fix_everything_in_wikidata.py" and execute it.TASK DETAILhttps://phabricator.wikimedia.org/T187737EMAIL
Xqt added a comment.
Next solution if you have the same scripts for different project: use global options like -family and -lang for it (or implement your own option to select a project variant).TASK DETAILhttps://phabricator.wikimedia.org/T187737EMAIL
Xqt added a comment.
And btw valhallasw’s proposal is not very different from your request:
Instead of
pwb.py wikidatafix fix_evething_in_wikidata.py
Just write
pwb.py wikidatafix/fix_evething_in_wikidata.py
and organize your folders accordingly.TASK
Xqt added a comment.
You also can have several pywikibot repositories each for a different project. Then cd to the wanted repo and run any script in it with pwb yourscript. You can shortcut the cd command via batch script.TASK DETAILhttps://phabricator.wikimedia.org/T187737EMAIL
Edgars2007 added a comment.
In T187737#3984184, @matej_suchanek wrote:
So if you keep your script names unique and register any folder in this config, I think you will find this useful.
Yes, I know about user_script_paths. Nice thing, but not exactly solution to this "problem".
a) as I said, I
valhallasw added a comment.
You can pass the full path of the file to pwb.py, so python pwb.py projects/wikidatafix/fix_everything_in_wikidata.py (or pwb.py projects\wikidatafix\fix_everything_in_wikidata.py on Windows) should work.TASK DETAILhttps://phabricator.wikimedia.org/T187737EMAIL
matej_suchanek added a comment.
user_config.py# # EXTERNAL SCRIPT PATH SETTING ##
# set your own script path to lookup for your script files.
# your private script path must be located inside the
# framework folder, subfolders must be delimited by '.'.
# every folder must