{"id":25001499,"url":"https://github.com/mansionnet/searchbot","last_synced_at":"2025-06-18T13:39:43.716Z","repository":{"id":270750783,"uuid":"911349856","full_name":"MansionNET/SearchBot","owner":"MansionNET","description":"An IRC bot that provides private search functionality using the Hearch API, designed for privacy and easy deployment.","archived":false,"fork":false,"pushed_at":"2025-01-06T19:11:21.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T20:38:04.412Z","etag":null,"topics":["hearchco","irc","irc-bot","metasearch","privacy","python","search-bot","search-engine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MansionNET.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T20:07:58.000Z","updated_at":"2025-01-06T19:11:24.000Z","dependencies_parsed_at":"2025-01-03T21:15:17.723Z","dependency_job_id":null,"html_url":"https://github.com/MansionNET/SearchBot","commit_stats":null,"previous_names":["mansionnet/searchbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FSearchBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FSearchBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FSearchBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MansionNET%2FSearchBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MansionNET","download_url":"https://codeload.github.com/MansionNET/SearchBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246237428,"owners_count":20745348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hearchco","irc","irc-bot","metasearch","privacy","python","search-bot","search-engine"],"created_at":"2025-02-04T20:35:22.561Z","updated_at":"2025-03-29T19:45:15.097Z","avatar_url":"https://github.com/MansionNET.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SearchBot\n\nAn IRC bot that provides private search functionality using the Hearch API, designed for privacy and easy deployment.\n\n## IRC Server Details\n\nJoin us on MansionNET IRC to chat with us, test the bot, and play some trivia! \n\n🌐 **Server:** irc.inthemansion.com  \n🔒 **Port:** 6697 (SSL)  \n📝 **Channel:** #opers, #general, #welcome, #devs (and many others)\n\n## Features\n\n- Privacy-focused search using Hearch's metasearch API\n- Private messaging for search results to protect user privacy\n- Color-coded, well-formatted search results\n- Rate limiting to prevent abuse\n- Automatic service management via systemd\n- Easy deployment and configuration\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- pip\n- virtualenv\n- systemd (for service management)\n\n### Basic Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/MansionNET/searchbot.git\ncd searchbot\n```\n\n2. Create and activate a virtual environment:\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n3. Install required packages:\n```bash\npip install -r requirements.txt\n```\n\n### Setting Up as a Service\n\n1. Create the systemd service file:\n```bash\nsudo nano /etc/systemd/system/searchbot.service\n```\n\n2. Add the following content (modify paths as needed):\n```ini\n[Unit]\nDescription=MansionNet SearchBot\nAfter=network.target\n\n[Service]\nType=simple\nUser=your_username\nGroup=your_username\nWorkingDirectory=/path/to/searchbot\nEnvironment=PATH=/path/to/searchbot/venv/bin\nExecStart=/path/to/searchbot/venv/bin/python searchbot.py\nRestart=always\nRestartSec=30\n\n[Install]\nWantedBy=multi-user.target\n```\n\n3. Make the bot executable:\n```bash\nchmod +x searchbot.py\n```\n\n4. Enable and start the service:\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable searchbot\nsudo systemctl start searchbot\n```\n\n## Usage\n\n### User Commands\n\nThe bot supports the following commands:\n\n- `!search \u003cquery\u003e`: Performs a private web search\n- `!help`: Shows available commands and usage information\n\nExamples:\n```\n/msg SearchBot !search python tutorial\n/msg SearchBot !help\n```\n\n### Service Management\n\nControl the bot service using standard systemd commands:\n\n```bash\n# Check status\nsudo systemctl status searchbot\n\n# View logs\nsudo journalctl -u searchbot -f\n\n# Stop the bot\nsudo systemctl stop searchbot\n\n# Restart the bot\nsudo systemctl restart searchbot\n```\n\n## Configuration\n\n### IRC Settings\n\nEdit `searchbot.py` to modify these settings:\n\n```python\nself.server = \"irc.example.com\"\nself.port = 6697  # SSL port\nself.nickname = \"SearchBot\"\nself.channels = [\"#test_room\"]  # Add more channels as needed\n```\n\n### Rate Limiting\n\nRate limiting can be adjusted in the `RateLimiter` class:\n\n```python\nself.rate_limiter = RateLimiter(\n    requests_per_minute=5,\n    requests_per_day=500\n)\n```\n\n## Technical Details\n\n### Result Formatting\n\nSearch results are formatted with IRC color codes for better readability:\n- Titles in green\n- URLs in blue\n- Descriptions in gray\n\nExample output:\n```\n1. Welcome to Python.org | https://www.python.org | The mission of the Python Software Foundation...\nSearch results powered by https://hearch.co/ - Privacy-focused metasearch\n```\n\n### API Integration\n\nThe bot uses the Hearch API for searching, with proper rate limiting and error handling. Each request includes:\n- Base64 encoded configuration\n- Multiple search engine support\n- Result ranking and scoring\n- Custom timeout settings\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to [Hearch](https://hearch.co/) for providing the search API\n- Thanks to the MansionNet IRC community\n- Icons by [icon8](https://icons8.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansionnet%2Fsearchbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmansionnet%2Fsearchbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmansionnet%2Fsearchbot/lists"}