Comments (12)
I finally found how it can be added into the request, as a workaround. In wikidata-edit
- lib/request.js:59
, replace:
const url = _.buildUrl(base, { action, format: 'json' })
by
const url = _.buildUrl(base, { action, format: 'json', bot: 1 })
from wikibase-cli.
@Peuc I tried to address this issue by letting the user set a bot=true
flag in wikidata-edit
via wikidata-cli
config: see 058cb49 and maxlath/wikibase-edit@c48021e, could you test it with your bot account? I don't have one so can't make the tests. Suggested steps to test:
cd /tmp
git clone https://github.com/maxlath/wikidata-cli -b botFlags
cd wikidata-cli
npm install
# Re-install wikidata-edit to use the botFlags branch
npm install wikidata-edit@https://github.com/maxlath/wikidata-edit#botFlags
# Use the instance we just installed of wikidata-cli
./bin/wd config bot true
# Trying anything
./bin/wd add-claim Q4115189 P921 Q34679
from wikibase-cli.
Wow, thanks for your patch!
The import to Wikidata is still ongoing, here. It's half done, so it will be finished in about two days.
In order to not interfere in the process, I will test your branch afterwards.
from wikibase-cli.
ok, keep me updated then :)
from wikibase-cli.
The import is done, I just did some tests of the botFlags branch.
It looks like the bot flag is added, no matter the value of the bot
property in config.js
(not set/false/true).
from wikibase-cli.
I tried to fix this issue: maxlath/wikibase-edit@1907bcd
Can you try to update wikidata-edit
? simply re-run
npm install wikidata-edit@https://github.com/maxlath/wikidata-edit#botFlags
from wikibase-cli.
$ npm install wikidata-edit@https://github.com/maxlath/wikidata-edit#botFlags
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
added 115 packages and updated 1 package in 12.555s
Exact same behaviour.
I did two checks that may help you:
- adding
delete config.bot
into wikidata-editindex.js:13
doesn't help - rollback
request.js:59
to removebot
actually remove bot flag into commit (yeah, better to double check :) )
from wikibase-cli.
I refactored a bit wikidata-edit
to make it more testable on the bot config behavior, and it now looks like it generates the expected URLs bot
flag and body assert
parameter, can you confirm?
from wikibase-cli.
Absolutely, this new version works as expected.
Is there a reliable way to auto-detect the bot flag if the bot
value is not set in config.json
, instead of asserting it's not a bot?
from wikibase-cli.
I have no idea, I added the assert
parameter because, at some point , edits where failing to detect the user who made the edit and I was told that the fix was to use assert=user
, but it's not very clear in which case it is or isn't needed. Is the fact that it's not auto-detecting a blocking issue, or would that just be a nice to have?
from wikibase-cli.
This is nowhere near a requirement, the patch fulfills all my needs as it.
Thank you very much for this!
from wikibase-cli.
you are very welcome :)
from wikibase-cli.
Related Issues (20)
- wd sparql TypeError (though -f csv works) HOT 2
- Update to commander 8
- Update commander from 8 to 9 HOT 7
- wd open --wikipedia silently failing HOT 2
- v16.0.0: Cannot perform queries on Ubuntu 20.04, node 14. -- v15.17.0 works HOT 2
- wb label q5 HOT 1
- Help needed on a more complex item edit HOT 8
- query for object and query HOT 2
- set-sitelink does not work on redirecting articles HOT 2
- wd search --type property does not find property HOT 4
- Use OAuth2 so users do not have to create their own owner-only OAuth consumers
- `wb sparql`: Support reading from stdin
- Add the ability to get the Wikidata IDs for multiple Wikipedia articles
- stray argument in static js object example HOT 5
- Error: invalid id -make less verbose
- Bad token error HOT 4
- Some qualifiers probably cannot be removed
- wikibase-cli 17.0.0 build issue HOT 2
- support custom datatypes HOT 4
- wb search: --properties results get ignored when --json is specified
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikibase-cli.