Skip to content

Commit 3f2f652

Browse files
authored
Delete tweets (HarshCasper#898)
* Added a new python feature to delete tweets automatically * Modified README.md file and some messages in main.py * Added requirements.txt file and updated README.md file * Minor changes related to formatting * Renamed the script folder, and update README.md file * Deleted Delete-Tweets folder
1 parent ca5d292 commit 3f2f652

File tree

5 files changed

+606
-0
lines changed

5 files changed

+606
-0
lines changed

Python/Delete_Tweets/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
# Delete Tweets Automatically
3+
4+
This is a utility to delete your tweets using python program
5+
6+
## Requirements
7+
8+
**credentials.json**: This file contains the credentials for accessing the twitter API. Generate the same from your twitter developer account and paste in this file
9+
10+
***Format of 'credentials.json' file***
11+
12+
{
13+
"consumer_key": "",
14+
"consumer_key_secret": "",
15+
"bearer_token": "",
16+
"access_token": "",
17+
"access_token_secret": ""
18+
}
19+
20+
### Usage
21+
22+
After cloning the project in your local directory, download the required packages using the command:
23+
24+
pip3 install -r requirements.txt
25+
26+
After all the required packages are installed, run the program using the following command.
27+
28+
python3 main.py --path P --param M [--count C] [--min N] [--max N] [--hours H] [--days D] [--verbose]
29+
30+
### Arguments
31+
32+
--path P : Path to the 'credentials.json' file on your local system. It is a mandatory argument.
33+
34+
--param M : Method of filtering the tweets. Pass one of the following: ['retweet', 'likes', 'time']. It is also a mandatory argument.
35+
36+
--count C : Number of tweets to be considered while filtering. It is set to 20 by default.
37+
38+
--min N : Minimum threshold of the parameter (retweet/likes). Set to 0 by default.
39+
40+
--max N : Maximum threshold of the parameter (retweet/likes). Set to the maximum value of INT by default.
41+
42+
--hours H : No of hours to go back from the current time for filtering tweets. Set to 0 by default.
43+
44+
--days D : No of days to go back from current time for filtering tweets. Set to 0 by default.
45+
46+
--verbose : Prints the tweets before deleting them.
47+
48+
You can also run the following command for any help about any argument.
49+
50+
python3 main.py -h

Python/Delete_Tweets/credentials.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"consumer_key": "",
3+
"consumer_key_secret": "",
4+
"bearer_token": "",
5+
"access_token": "",
6+
"access_token_secret": ""
7+
}

0 commit comments

Comments
 (0)