Parsing people from People Nearby function and mailing them via Telegram API
REQUIREMENTS:
- telethon
- numpy
- pandas
INSTALLATION:
- Clone the repository
- pip install -r requirements.txt
- Add your api key in telegram_app.py
- Create a telegram session with create_session.py (for example: python create_session.py +123422353 0123432 thisIsk1ndaHasH#$%1023123 )
- Start program: python telegram_app.py <stopputin_dataset> []
Possible tasks:
- spam
- parse
- group
- count
- triangulate (I have not added this as a separate instruction. But you can use the triangulate_from_coords func manually)
<stopputin_dataset> example is provided here: Data/stopputin260420.html
So the eventual example commands look like be:
python telegram_app.py parse Data/stopputin260420.html python telegram_app.py spam Data/stopputin260420.html python telegram_app.py count Data/stopputin260420.html python telegram_app.py group Data/stopputin260420.html 12332432
PROJECT STRUCTURE:
- telegram_app.py contains all the functions. It is the main script.
- start_gnome_client.sh is a shell script which is run by telegram_app.py to create a separate gnome-terminal window with working client (Gnome-terminal is a command line in linux). It is provided with all parameters by telegram_app.py
- create_client_window.py is run by start_gnome_client.sh to begin the work ( It should be named as run_client.py and I will rename it later :) )
- create_session.py is a simple script which is run to initialize a session and create a session file
- all the logs are saved in logs directory. (I should work on them a little bit more. They seem to be not finished)
- Data directory contains cities_people_parsed(txt files with parsed people ids), stopputin.net downloaded file with all the data, and world_cities.csv (we use cities' coordinates from there)
WORK DESCRIPTION:
- telegram_app.py determines the task and the dataset
- telegram_app.py starts start_gnome_client.sh
- These separated terminal windows start create_client_window.py