Created
May 22, 2017 11:06
-
-
Save pe3/8e560d892327016b4a9cc0ec7e2c443c to your computer and use it in GitHub Desktop.
Programmatically writing to Wikidata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
// Required | |
username: 'personal-wikidata-username', | |
password: 'password', | |
// Optional | |
verbose: true // Default: false | |
} | |
const wdEdit = require('wikidata-edit')(config) | |
// writing to one of the three sandbox nodes available for testing | |
// https://www.wikidata.org/wiki/Q4115189 | |
// https://www.wikidata.org/wiki/Q13406268 | |
// https://www.wikidata.org/wiki/Q15397819 | |
wdEdit.label.set('Q4115189', 'fi', 'Mitäs ihmettä!?') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "t", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"wikidata-edit": "https://github.com/pe3/wikidata-edit" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment