π·πΊ Π ΡΡΡΠΊΠ°Ρ Π²Π΅ΡΡΠΈΡ
A powerful Telegram bot for managing notes and media files with automatic processing using Google's Gemini AI. The bot helps organize and format your notes in Markdown, making them perfect for Obsidian.
- β¨ Updated Gemini model to gemini-2.0-flash-exp
- π οΈ Improved text processing and formatting
- π Optimized performance
- π Enhanced proxy stability
- π Added support for embedding various links
- π€ AI-powered note processing using Google Gemini
- π Automatic Markdown formatting
- π·οΈ Custom tag management system
- πΈ Support for various media files (photos, audio, video, documents)
- βοΈ Dropbox integration
- π Proxy support for stable connection
- π₯ Multi-user support
- π± Mobile-friendly experience
- Python 3.8+
- Telegram Bot Token
- Google Gemini API Key
- Dropbox API credentials (optional)
- Proxy (optional)
- Clone the repository:
git clone https://github.com/Sppqq/obsidianAI.git
cd obsidianAI- Install required dependencies:
pip install -r requirements.txt- The bot will automatically create a
config.jsonfile on first run. Configure it with your credentials:
{
"user1": {
"chat_id": YOUR_CHAT_ID,
"bot_token": "YOUR_BOT_TOKEN",
"gemini_api": "YOUR_GEMINI_API",
"gemini_model": "gemini-2.0-flash-exp",
"tags": ["#code", "#study", "#files", "#ai", "#other"],
"db_app_key": "your-dropbox-key",
"db_app_secret": "your-dropbox-secret",
"db_redirect_uri": "http://localhost:8080",
"proxy": {
"http": "http://your-proxy-server",
"https": "http://your-proxy-server"
}
}
}-
Telegram Bot Token:
- Message @BotFather on Telegram
- Create new bot with
/newbot - Copy the provided token
-
Google Gemini API:
- Visit Google AI Studio
- Create an API key
- Copy the API key
-
Dropbox API (optional):
- Go to Dropbox Developer Console
- Create a new app
- Set the redirect URI to
http://localhost:8080 - Copy App key and App secret
For stable connection in some regions, you may need to use a proxy:
"proxy": {
"http": "http://username:password@proxy-server:port",
"https": "http://username:password@proxy-server:port"
}- Start the bot:
python main.py-
Send
/startto your bot on Telegram -
Use the following commands:
/start- Initialize the bot/tags- Manage your tags
-
Send any text or media to the bot:
- The bot will process it using Gemini AI
- Format it in Markdown
- Add appropriate tags
- Save it as a
.mdfile
The bot automatically formats notes with:
- Clear, concise titles
- Markdown formatting
- Embedded media
- Custom tags
- Proper text formatting with bold emphasis
- Emoji enhancements
- Working links
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or issues, please create an issue in the repository or contact the author via Telegram.