I'm the code, and deployment of Twitter bot WikidataMeter. I tweet a few fun things about Wikidata as it grows.
Feel free to suggest more tweets by creating an Github issue.
Bot checks this data every 30 minutes, the value that is checked is live.
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
You'll need to install my dependencies using composer.
composer install
You can run a single localy only echo version using:
I_AM_BRING_TESTED=1 php run.php
This will not use the main persistent storage, and also it will not tweet!
And in order to fully integrate with the services you'll need to populate a .env
file.
Checkout .env.example
for what is needed.
Then just run the main script.
php run.php
I run on Github Actions on a cron using a docker container.
You can build the docker container using the following.
docker build . -t twitter-wikidatameter
Services:
- Github Actions - Building Docker images & running the cron for the bot
- Wikidata - Getting the edit data (live)
- Wikimedia Graphite - Getting entity count data (daily)
- JSONStorage.net - Some persistence between runs
- Twitter - For publishing the tweets
Libraries:
- addwiki/mediawiki-api-base - Talking to the Wikidata API
- atymic/twitter - Talking to the Twitter API
- vlucas/phpdotenv - Reading env vars from a .env file
- guzzlehttp/guzzle - Talking to the JSONStorage.net API