Closed hugolpz closed 4 weeks ago
Maybe you can use CeL.wiki.data.value_of(entity.claims.P3)[0]
instead of currFile
?
Ok I see. It works (Special:Contributions/Dragons_Bot).
Indeed, the strings are slightly different : | Source | Type | Value |
---|---|---|---|
Commons.wikimedia.org | filename string | Coq_Nm_1_11-_Elix.ogv | |
./data/videos.js | currFile string (carefully extracted from Commons) | Coq_Nm_1_11-_Elix.ogv | |
Lingualibre.org | P3 string | Coq Nm 1 1 1 - Elix.ogv |
It is true wikimedia Commons has an url resolver for
"_" == " " // underscore resolves as equal to blank space.
P3val = CeL.wiki.data.value_of(entity.claims.P3)[0];
console.log(currFile," vs ",P3val) // Coq_Nm_1_1_1_-_Elix.ogv vs Coq Nm 1 1 1 - Elix.ogv
I was locked on this one and didn't know how to print the P3's value.
Thank you @kanasimi 👍🏼
Hello Kanasimi,
I hope you are going well.
Some news from my side. I'm lightly back on Lingualibre cleaning. I try to update claims P3, which means remove then add.
I follow the manual https://kanasimi.github.io/wikiapi/Wikiapi.html#data
My script 1) fail to remove (does nothing, no error either), 2) succeed to add the new value. So my property ends up with 2 videos while I just wants the new one.
Also, a github search on
remove
seems to only shows the manual's examples, and no active code usingremove
. https://github.com/search?q=repo%3Akanasimi%2Fwikiapi+remove&type=codeSo I wonder if the feature is active.
Reproduce bug
Givent ./data/videos.js
Then
logins.js
:Then
script.js
:See also