Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/addshore/twitter-wikidatameter
A Twitter bot powered by Github Actions tweeting various Wikimedia milestones to some Twitter bots
https://github.com/addshore/twitter-wikidatameter
bot github-actions php twitter twitter-bot wikidata wikimedia wikipedia
Last synced: 3 months ago
JSON representation
A Twitter bot powered by Github Actions tweeting various Wikimedia milestones to some Twitter bots
- Host: GitHub
- URL: https://github.com/addshore/twitter-wikidatameter
- Owner: addshore
- License: mit
- Created: 2021-04-09T14:48:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T17:40:38.000Z (about 1 year ago)
- Last Synced: 2024-10-10T17:31:14.303Z (3 months ago)
- Topics: bot, github-actions, php, twitter, twitter-bot, wikidata, wikimedia, wikipedia
- Language: PHP
- Homepage: https://twitter.com/WikidataMeter
- Size: 271 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Twitter WikidataMeter Bot
I'm the code, and deployment of Twitter bot [WikidataMeter](https://twitter.com/WikidataMeter).
I tweet a few fun things about Wikidata as it grows.## Tweets
Feel free to suggest more tweets by creating an Github issue.
### Everytime another 10,000,000 edits happens
Bot checks this data every 30 minutes, the value that is checked is live.
![](https://i.imgur.com/mgjNAXs.png)
### Everytime Item count crosses a 1,000,000 boundary
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
![](https://i.imgur.com/ShAGn9b.png)
### Everytime Property count crosses a 100 boundary
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
![](https://i.imgur.com/Kp8Jx2b.png)
### Everytime Lexeme count crosses a 10,000 boundary
Bot checks this data every 30 minutes, the value that is checked is calculated once a day.
![](https://i.imgur.com/QYNDkNn.png)
## Development
You'll need to install my dependencies using composer.
```sh
composer install
```You can run a single localy only echo version using:
```sh
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.
```sh
php run.php
```## Deployment
I run on Github Actions on a cron using a docker container.
You can build the docker container using the following.
```sh
docker build . -t twitter-wikidatameter
```## Makes use of
Services:
- [Github Actions](https://github.com/features/actions) - Building Docker images & running the cron for the bot
- [Wikidata](https://www.wikidata.org) - Getting the edit data (live)
- [Wikimedia Graphite](graphite.wikimedia.org) - Getting entity count data (daily)
- [JSONStorage.net](https://www.jsonstorage.net/) - Some persistence between runs
- [Twitter](https://www.twitter.com) - For publishing the tweetsLibraries:
- [addwiki/mediawiki-api-base](https://github.com/addwiki/mediawiki-api-base) - Talking to the Wikidata API
- [atymic/twitter](https://github.com/atymic/twitter) - Talking to the Twitter API
- [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv) - Reading env vars from a .env file
- [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) - Talking to the JSONStorage.net API