Reverse Image Search Telegram Bot Using MS Azure/Local (server maybe off)
π Stars | π΄ Forks | π Issues | π Open PRs | π Close PRs | π Languages | π Contributors |
βοΈ Cloud | π§ OS | π» Terminal | π¦ PyPI | β€οΈ Open Source |
Send me images, gifs or stickers(non-animated), I will send you direct reverse image search links of IQDB, Google, TinEye, Yandex and Bing. For anime images IQDB and TinEye, for other images, I recommend using Google, Bing and Yandex.
- Give you image reverse search links
- Supports normal images like JPG, PNG, WEBP
- Supports stickers
- Supports GIFs (can take some time till the GIFs are ready)
- /help, /start: show a help message with information about the bot and its usage.
- /best_match URL: Search for the best match on TinEye (and IQDB when nothing is found on TinEye). The
URL
is a link to an image
With this info, we now install our virtual environment with (check pre-installations file):
chmod +x pre-installations.sh
./pre-installations.sh
pip install pipenv # Install pipenv
pipenv --version
git clone https://github.com/c0sm0void/ReVot.git
cd /ReVot
pipenv shell
pipenv install # Install all requirements
You have to get an API Token from Telegram. You can easily get one via the @BotFather.
Now that you have your API Token, create a settings.py
file and add one of the configurations below based on your preferred uploading method.
If you want to upload files using SSH, use the following configuration in your settings.py
:
TELEGRAM_API_TOKEN = 'Tel Bot Token By @BotFather'
UPLOADER = {
'uploader': 'reverse_image_search_bot.uploaders.ssh.SSHUploader',
'url': 'Host Domain Name',
'configuration': {
'host': 'Host IP (PUBLIC)',
'user': 'Yourname',
'password': 'Password',
'upload_dir': '/path/to/ReVot/',
'key_filename': '/path/to/.ssh/rsakey.pub (Public key)',
}
}
If you prefer to upload files from your local file system, use the following configuration in your settings.py
:
TELEGRAM_API_TOKEN = 'Tel Bot Token By @BotFather'
UPLOADER = {
'uploader': 'reverse_image_search_bot.uploaders.file_system.FileSystemUploader',
'url': 'Host Domain Name',
'configuration': {
'path': '/path/to/ReVot/',
}
}
Finally, you can use this to start your bot.
python run_bot.py
- Use Python v3.12 as default
- ssh-keyscan -H <IP address/Hostname> >> ~/.shh/known_hosts
- sudo -H pip install -U pipenv
- Python 3.12+
- pipenv: For virtual environment and dependency management
- python-telegram-bot: For interacting with Telegram APIs
- Reverse Image Search Engines:
- Bing
- Yandex
- TinEye
- IQDB
- MS Azure for hosting
- Ubuntu virtual machine for hosting
ReVot/
β
βββ .github/ # GitHub-specific files
β βββ ISSUE_TEMPLATE/
β βββ bug_report.md # Template for reporting bugs
β βββ custom.md # Custom issue template
β βββ feature_request.md # Template for requesting features
β β
β βββ workflows/ # Directory for GitHub Actions workflows
β βββ greetings.yml # Workflow for greeting new contributors
β βββ labeler.yml # Workflow for auto-labeling pull requests and issues
β
βββ deploy/ # Deployment scripts and configurations
β βββ after_push # Post-deployment scripts
β
βββ reverse_image_search_bot/ # Main bot directory
β βββ images/ # Sample image for demonstration
β β βββ example_usage.png # Example bot usage
β β
β βββ uploaders/ # Uploader modules
β β βββ __init__.py # Initialize uploaders package
β β βββ base_uploader.py # Base class for uploaders
β β βββ file_system.py # File system operations
β β βββ ssh.py # SSH related functions
β β
β βββ __init__.py # Initialize bot package
β βββ bot.py # Main bot logic
β βββ commands.py # Command handling for the bot
β βββ image_search.py # Functions for reverse image search
β βββ settings.example.py # Example settings file for API tokens
β βββ settings.example1.py # Another example settings file
β βββ settings.py # Settings file
β βββ utils.py # Utility functions and helpers
β
βββ .gitignore # Files and directories to be ignored by Git
βββ CODE_OF_CONDUCT.md # Community guidelines and rules
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # License information
βββ Pipfile # Pipenv dependencies
βββ Pipfile.lock # Locked dependency versions
βββ pre-installations.sh # Pre-installation
βββ README.md # Main project documentation
βββ run_bot.py # Script to run the bot
This project is licensed under the MIT License. You are free to use, modify, and distribute this software as long as the original license and copyright notice are retained.
git clone https://github.com/c0sm0void/ReVot.git
git checkout -b feature/your-feature
git add .
git commit -m "Add your descriptive commit message here"
git push origin feature/your-feature
flowchart LR
Fork[Fork the project]-->branch[Create a New Branch]
branch-->Edit[Edit file]
Edit-->commit[Commit the changes]
commit -->|Finally|creatpr((Create a Pull Request))
- We extend our heartfelt gratitude for your invaluable contribution to our project! Your efforts play a pivotal role in elevating ReVot to greater heights.
- Make sure you show some love by giving to our repository.
|
|