Open fititnt opened 2 years ago
Hummm.... this thing is quite unusual. The https://github.com/wikimedia/pywikibot can be installed as pip package (supposedly to be used by other tools) or by clonning the full thing, doing init submodules, and etc. Basically a fork.
The second one seems to be the most used. At least it worked more as expected than trying to run the CLI version (if installed as pip) since it started to get several errors about not finding paths and etc.
I think I will try a bit more the clone thing and do how it will works. But it seems that this pywikibot actually ships with a lot of small scripts that do several things. So it may be running as this is for several people for years, and unlikely would happens some sort of refactoring.
Humm... not sure if is my mistake, or if things are somwwhat hardcoded for upload of .tab files. In general the errors messages not even show references to what would be tab format. But it accept extensions with tab, however it try to auto-detect the mimetype (which will be text format) and then deny the automated upload.
Sandbox url
{
"action": "upload",
"format": "json",
"filename": "Data:Sandbox/EmericusPetro/Example.tab",
"ignorewarnings": 1,
"file": "...",
"token": "...+\\"
}
{
"error": {
"code": "verification-error",
"info": "File extension \".tab\" does not match the detected MIME type of the file (text/plain).",
"details": [
"filetype-mime-mismatch",
"tab",
"text/plain"
],
"*": "See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
},
"servedby": "mw1404"
}
https://commons.wikimedia.org/wiki/Data:Sandbox/EmericusPetro/Example.tab
It may be relevant (even if not running as bot, but by human request) to allow to syncronize files, such as tabular data, with Wikipedia Commons.
Related to #26. Also weeks ago we started to discuss on IRC about some place to upload tabular-like format (or something not as structured as Wikidata).
Wikimedia commons do have a tabular format (which uses JSON). Is not exactly what we need, but have somewhat an advantage: it allows data upload there be used as source for everything else on Wikimedia wikis.
Anyway, one sandbox use case would be we be able to show which Q Itens we're working on without need to redirect people outside Wikipedia domains.