Weaver is a simple script to export your Telegram chat titles to a CSV file using the Telethon library. This project uses environment variables to securely manage your Telegram API credentials.
- Python 3.x
- Telegram account
- Telegram API ID and API Hash (obtain these from my.telegram.org)
-
Clone the repository:
git clone https://github.com/your-username/weaver.git cd weaver
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the project directory and add your Telegram API credentials:TELEGRAM_API_ID=YOUR_API_ID TELEGRAM_API_HASH=YOUR_API_HASH
- Ensure your environment variables are set in the
.env
file. - Run the script to export your chat titles to a CSV file:
python export_chats.py
- The script will generate a
chat_list.csv
file in the project directory, which you can upload to Google Sheets.
weaver/ │ ├── .env # Environment variables (not included in the repo) ├── .gitignore # Git ignore file ├── export_chats.py # Main script to export chats ├── README.md # Project README file ├── requirements.txt # Python dependencies └── venv/ # Virtual environment directory (optional)
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.