This repository has been archived on 2023-07-25. You can view files and clone it, but cannot push or open issues or pull requests.
2017-07-20 09:38:55 +02:00
|
|
|
# Pi Hole stats tweeter
|
2017-04-27 13:30:39 +02:00
|
|
|
I want to send a a daily tweet with the results of what my Pi-Hole blocked. Here is the code, run in Python3.
|
2017-04-27 13:33:46 +02:00
|
|
|
|
|
|
|
# How to use
|
2017-05-11 10:50:18 +02:00
|
|
|
Install following python dependencies with sudo pip install:
|
|
|
|
tweepy
|
|
|
|
datetime
|
|
|
|
json
|
|
|
|
urllib
|
2017-04-27 13:40:32 +02:00
|
|
|
|
2017-04-27 13:36:42 +02:00
|
|
|
Download python file and replace it with your own account data and link to your own path/to/admin/api.php
|
2017-04-27 13:33:46 +02:00
|
|
|
|
2017-05-11 10:50:18 +02:00
|
|
|
# Cronjob
|
|
|
|
This will tweet your stats at 23:59 everyday
|
2017-05-11 10:50:38 +02:00
|
|
|
|
2017-05-11 10:50:18 +02:00
|
|
|
59 23 * * * sudo python3 /home/pi/Desktop/twittertweeter.py >/dev/null 2>&1
|
|
|
|
|
2017-05-06 16:48:17 +02:00
|
|
|
# Twitter acces keys and tokens
|
2017-05-11 20:59:51 +02:00
|
|
|
On their own website it is quite clearly explained: https://dev.twitter.com/oauth/overview/application-owner-access-tokens
|
2017-05-06 16:48:17 +02:00
|
|
|
|
2017-04-27 13:33:46 +02:00
|
|
|
# Reddit
|
|
|
|
https://www.reddit.com/r/pihole/comments/67umvj/need_help_with_doing_a_daily_pihole_tweet/
|