This project is a Bookmark Manager web application with an integrated Telegram bot interface. It allows users to save, list, and fetch bookmarks through both a web interface and a Telegram bot.
- Save bookmarks with title and summary
- List saved bookmarks
- Fetch content from URLs
- Telegram bot integration for remote access
- Download fetched content as a text file
- Seamless login between Telegram bot and web interface
- Python 3.7+
- MongoDB
- Telegram Bot Token (obtain from BotFather)
-
Clone the repository:
git clone https://github.com/yourusername/bookmark-manager.git cd bookmark-manager
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root and add your configuration:TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here WEBSITE_URL=http://your-website-url.com MONGO_URI=mongodb://localhost:27017/minibookmark SECRET_KEY=your_secret_key_here
-
Start the Flask web server:
python app.py
-
Open a web browser and navigate to
http://localhost:5000
-
Use the web interface to add, list, and fetch bookmarks
-
Start the Telegram bot:
python telegram_bot.py
-
Open Telegram and search for your bot using the username you set up with BotFather
-
Start a conversation with your bot and use the following commands:
/start
: Get a welcome message/help
: List available commands/login
: Log in to your account/signup
: Create a new account/logout
: Log out of your account/add <url>
: Add a new bookmark/list
: List all saved bookmarks/fetch <url>
: Fetch content from a URL and offer to download/website
: Get a link to the web application
app.py
: Contains the Flask web applicationtelegram_bot.py
: Contains the Telegram bot implementationtemplates/
: Contains HTML templates for the web interfacestatic/
: Contains static files (CSS, JavaScript) for the web interface
- Added ability to download fetched content as a text file through Telegram
- Fixed character encoding issues when downloading content
- Improved error handling and user feedback in both web and Telegram interfaces
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.