https://github.com/ananto30/hadith-every-hour
📖 GitHub action schedular (cron) that posts a Hadith every hour on Twitter & Facebook.
https://github.com/ananto30/hadith-every-hour
cron github-actions hadith python python3 scheduler tweepy tweets twitter twitter-api twitter-bot
Last synced: 10 months ago
JSON representation
📖 GitHub action schedular (cron) that posts a Hadith every hour on Twitter & Facebook.
- Host: GitHub
- URL: https://github.com/ananto30/hadith-every-hour
- Owner: Ananto30
- Created: 2020-10-15T08:11:44.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T12:11:57.000Z (over 1 year ago)
- Last Synced: 2024-10-29T14:39:29.401Z (over 1 year ago)
- Topics: cron, github-actions, hadith, python, python3, scheduler, tweepy, tweets, twitter, twitter-api, twitter-bot
- Language: Python
- Homepage:
- Size: 1.31 MB
- Stars: 17
- Watchers: 5
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hadith Every Hour
📖 A bot that posts a Hadith every hour on Twitter & Facebook
(Every 6 hours for now to avoid spamming)
Follow on Twitter @HadithEveryHour & Facebook @HadithEveryHour
### Status
[](https://github.com/Ananto30/hadith-every-hour/actions/workflows/tweet.yml)
[](https://github.com/Ananto30/hadith-every-hour/actions/workflows/post_to_facebook.yml)
Currently posting the Hadiths from Sahih al-Bukhari in serial.
### Concept
It's really simple. GitHub action is written in this file. You can notice a scheduler -
```
on:
schedule:
- cron: "0 */6 * * *"
```
And the rest of the process is self explanatory.
A tracker is used to put the latest posted Hadith number in the `hadith_track.json` file.
API's are from this project - https://github.com/Ananto30/ask-hadith
### Flow
```
Get last Tweeted Hadith number from tracker
â£
Get Hadith from API
â£
Make chunks for long Hadith
â£
Limit chunks for very long Hadith
â£
Tweet and comment chunks
â£
Format and post on Facebook
â£
Update tracker
```
### Contribution
There can be a different approach of Tweeting (as Twitter has character limits on each post) or Hadith Selection, please create an issue and let's discuss about that.