Skip to content
archpdx edited this page Nov 18, 2021 · 4 revisions

In order to sucessfully run npm run wikidata, you first have to add a secrets.json file in the project root (same folder as package.json and README.md etc.) - here is the format of the secrets file:

{
  "twitter": [
    {      
      "twitter_consumer_key": "••••••••••",
      "twitter_consumer_secret": "••••••••••",
      "twitter_access_token_key": "••••••••••",
      "twitter_access_token_secret": "••••••••••"
    },
    … + a few more of these to avoid the rate limit …
  ],
  "wikibase": {
    "username": "bhousel",
    "password": "••••••••••"
  }
}

If you don't know how to get Twitter app keys, there's a guide on how to do so below. wikibase is just the username and password for your Wikidata account. This file will not be added to the repo on your next commit as the file is in .gitignore

How to get Twitter app keys

  1. Sign up for a Twitter dev account
  2. Add a standalone app
  3. Open the settings for the app and click on Keys and tokens
  4. Click on Generate under Access Token and Secret - make sure to save these to your secrets file as you won't be able to view these again without regenerating them
  5. Make as many apps as you want to avoid the rate limit. Twitter limits you to creating 10 apps with a free account (3 apps per day), which is fine for running npm run wikidata.

Home

For Contributors

Contributing to the index

Advanced Topics

For Developers

Information for developers using the name-suggestion-index in another project.

For Maintainers

Information for maintainers, including how to clone and build the project.

 

Clone this wiki locally