maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
223 stars 24 forks source link

how to not log in for every single edit? #120

Closed rwst closed 3 years ago

rwst commented 4 years ago

The way I use wikibase-cli (call wd with single edits) leads to unneccessary logins to Wikidata which is now discussed in https://phabricator.wikimedia.org/T256533. They cite https://www.mediawiki.org/wiki/API:Login#Additional_notes where we can read: If you are sending a request that should be made by a logged-in user, add assert=user parameter to the request you are sending in order to check whether the user is logged in. If the user is not logged-in, an assertuserfailed error code will be returned.

Can your code do this between calls of wd? If not, can it be implemented? If not, would batch mode editing resolve it?

maxlath commented 4 years ago

yes, batch mode would resolve this.

Individual calls to wd do re-login every time, as cookies are not stored between sessions. We could consider implementing such a store. Alternatively, we could push people to use batch mode by displaying a warning when doing many successive edits without batch mode

rwst commented 4 years ago

Individual calls to wd do re-login every time, as cookies are not stored between sessions.

Something like this would be helpful in the documentation.

maxlath commented 4 years ago

@rwst your pull requests to improve the documentation are welcome.

maxlath commented 3 years ago

I assume we can consider this addressed by #122 and close for now