Tweeting the wisdom of the Constitution of India and its makers.
Curated by Maximusden and Sai Krishna
The debates of the Constituent Assembly, the articles in the constitution & the scholarly commentary on it are very contextualized and cannot be captured by 280 characters.
Requesting citizens to add context wherever necessary and be part of this discussion.
- Scientific Temper in India: Article on Scientific temper in India, mourning the loss of Science martyrs.
- Appointing the umpire: Article on the Supreme Court's judgement on the appointment of the Cheif Election Commissioner. Data and Visualisations can be found at: Link
- Register a Project app on the developers portal. Free version is enough for my app.
- Get API_KEY, API_SECRET, ACCESS_TOKEN ACCESS_TOKEN_SECRET from the developers portal for the app. You'd use them for authentication. Save them in the environment variables.
- I used these two endpoints for my bot
tweet_url = 'https://api.twitter.com/2/tweets'
media_upload_url = 'https://upload.twitter.com/1.1/media/upload.json'
tweet_url is used to post the tweet. This is a v2 API
media_upload_url is used to upload media (images). This is a v1.1 API.
-
All my tweets information is stored in a google sheets. I used pygsheets to get one tweet and formatted it.
-
Uploaded the media using media_upload_url; retreived media_ids and then used the tweet_url to tweet!
-
To run the bot on every reboot of my Pi (cuz power cuts :/)
sudo nano /etc/rc.local # Add the following before exit 0 /bin/bash /path/to/your/script.sh
I had created a run_bot.sh shell script which hsa the workflow coded.