{"id":13826760,"url":"https://github.com/baychimo/pictobot","last_synced_at":"2025-07-09T01:31:25.356Z","repository":{"id":43950153,"uuid":"181177814","full_name":"baychimo/pictobot","owner":"baychimo","description":"A chatbot to use as a basic universal translator. If you can't say it, show it!","archived":true,"fork":false,"pushed_at":"2022-02-13T09:53:49.000Z","size":2844,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-05T09:15:41.262Z","etag":null,"topics":["fuzzywuzzy","noun-project","python","python-telegram-bot","python3"],"latest_commit_sha":null,"homepage":null,"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/baychimo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-13T13:48:41.000Z","updated_at":"2023-01-28T03:07:38.000Z","dependencies_parsed_at":"2022-09-13T03:02:04.210Z","dependency_job_id":null,"html_url":"https://github.com/baychimo/pictobot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baychimo%2Fpictobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baychimo%2Fpictobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baychimo%2Fpictobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baychimo%2Fpictobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baychimo","download_url":"https://codeload.github.com/baychimo/pictobot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"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":["fuzzywuzzy","noun-project","python","python-telegram-bot","python3"],"created_at":"2024-08-04T09:01:43.690Z","updated_at":"2024-11-20T05:31:06.333Z","avatar_url":"https://github.com/baychimo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"This repository is now archived, use at your own risk (update dependencies first, if you ever use this)\n\n[![Screenshots of a conversation with the Pictobot](https://raw.githubusercontent.com/baychimo/pictobot/master/screenshots/sample_pictograms_sm.png \"Screenshots of a conversation with the Pictobot\")](https://raw.githubusercontent.com/baychimo/pictobot/master/screenshots/sample_pictograms_lg.png)\n\n# Pictobot\n\nA chatbot to use as a basic universal translator. If you can't say it, show it!\n\n[![Screenshots of a conversation with the Pictobot](https://raw.githubusercontent.com/baychimo/pictobot/master/screenshots/screenshots_sm.png \"Screenshots of a conversation with the Pictobot\")](https://raw.githubusercontent.com/baychimo/pictobot/master/screenshots/screenshots_lg.png)\n\nThis bot is shown here as an example of a telegram bot written in python, which might be helpful to some. It is not a framework or a template, in my opinion. But it was enough IMHO to participate in the [Telegram BotPrize](https://telegram.org/blog/botprize), because I believe in the usefulness of this simple idea.\nThe contest was a good opportunity to learn about chatbots and pictograms.\n\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installing](#installing)\n- [Running the bot](#running-the-bot)\n- [Running the tests](#running-the-tests)\n- [Deployment](#deployment)\n- [Built With](#built-with)\n- [Docs](#docs)\n- [Contributing](#contributing)\n- [Author](#author)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for pointers on how to deploy the project on a live system.\n\n### Prerequisites\n\nIf you want to follow these instructions to run the chatbot on your machine, you need:\n- [python](https://www.python.org/) 3.6 or higher.\n- [a bot TOKEN from Telegram](https://core.telegram.org/bots#6-botfather \"Ask BotFather\"). You should also toggle inline mode for your bot (`/setinline` command within BotFather). I recommend creating two bots if you want to get serious: one for dev/test and the other one for production.\n- If you wish to run the integration tests, you'll also need to get API keys from Telegram: [follow instructions here](https://telethon.readthedocs.io/en/latest/extra/basic/creating-a-client.html).\n\nThese instructions are for running in dev/test mode on MacOS and Linux.\n\nCopy this project's files where you want them:\n\n```\n$ cd /to/where/you/want/the/bot/to/live\n$ git clone https://github.com/baychimo/pictobot\n```\nIf you don't have [git](https://git-scm.com/downloads) installed, you can download the files by clicking the green \"Clone or download\" button at the top of the page.\n\n### Installing\n\nCreate a virtual environment on your machine with:\n\n```\n$ python3 -m venv .virtualenvs/pictobot\n```\n\nActivate the environment and install the needed python packages:\n\n```\n$ source ~/.virtualenvs/pictobot/bin/activate \u0026\u0026 cd /to/where/you/want/the/bot/to/live\n(pictobot)$ pip install --upgrade pip setuptools\n(pictobot)$ pip install -r requirements.txt\n```\n\nReplace the fake `TOKEN` in the file `settings/local_sample.py` by yours and rename that file to `local.py`. If you wish to run the integration tests, also replace the values of `api_id` and `api_hash` with yours.\n\n## Running the bot\n\nIf you followed the above instructions, to run the bot locally you just need to:\n\n```\n(pictobot)$ python pictobot/core.py\n``` \n\nNow go to your telegram app (on your smartphone/desktop/browser) and contact your bot by its name (the one you chose earlier): `@YourBot`.\n\n## Running the tests\n\nIf you wish to run the automated tests for this project, just run these commands from the root of the project.\n\nFor unit tests:\n\n```\n(pictobot)$ pytest -v --durations=0 --hypothesis-show-statistics tests/test_unit.py\n```\n\nFor integration tests:\n\n```\n(pictobot)$ pytest -v --durations=0 --hypothesis-show-statistics tests/test_integration.py\n```\n\nThe integration tests require patience. They are done through a [userbot](https://github.com/LonamiWebs/Telethon), and to avoid being (rightfully) blacklisted or rate-limited by Telegram, there is a 3 second wait between each test.\n\n## Deployment\n\nIf you want to run it on a server, I can write instructions. [You just need to ask](https://github.com/baychimo/pictobot/issues/new).\nFor now, if you already have python experience, you should read the last lines of `core.py` and check the settings in `settings/production_sample.py` to get you started. I used nginx/uwsgi/letsencrypt/supervisor, but other combos are possible (check out [python-telegram-bot docs on the subject](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks)).\nIf you are in a hurry, start by the [great wiki of the Python Telegram Bot](https://github.com/python-telegram-bot/python-telegram-bot/wiki) framework.\n\n## Built With\n\n- [Python-Telegram-Bot](https://github.com/python-telegram-bot/python-telegram-bot) - The excellent Telegram Bot framework, making it very easy to get started with Telegram. Their docs are good and they are very helpful on their Telegram group too. Highly recommended!\n- [FuzzyWuzzy](https://github.com/seatgeek/fuzzywuzzy) - \"Fuzzy string matching like a boss\". That says it all.\n- [The Noun Project](https://thenounproject.com/) - All the images used by the bot were downloaded from the noun project website before being adapted into pictograms with [inkscape](https://inkscape.org/), the credits are listed below.\n\n## Docs\n\nThe docstring generated docs are in the gh-pages branch. They are published here: [baychimo.github.io/pictobot](https://baychimo.github.io/pictobot/)\n\n## Contributing\n\nI don't intend to maintain this project unless I have some new ideas that would make the process fun. But if you have any questions, need further instructions for your platform, feel free to [open an issue](https://github.com/baychimo/pictobot/issues/new). And feel free to fork it of course! That's why I put it here for.\n\nHere are some ideas for improvments:\n- Store data in a DB instead of dicts. To make things practical this should be accompanied by some UI to update the database and add images: a micro webapp?\n- The bot is translatable, and translated in french for now. But there needs to be a way for users to switch languages which means storing at least minimal user data somewhere.\n- Find a way to automate the creation and tagging of pictograms. Maybe a toolchain involving a [GAN](https://en.wikipedia.org/wiki/Generative_adversarial_network) and [imagemagick](https://www.imagemagick.org/)?\n\nHave fun!\n\n## Author\n\n**Jonathan Guitton** - [Baychimo](https://github.com/baychimo).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## Acknowledgments\n\n- Inspiration\n    - Star Trek's universal translator: we have to start somewhere, right?\n    - My own experience as a travelling introvert. Most people don't want to mimic/gesticulate that they need toilet paper. Or so I thought :-)\n- Beautiful logo made by the great [Sebastien Lasserre](https://seblasserre.blogspot.com/).\n- All images used by the pictobot are licensed under Public Domain, except for the following which are licensed under Creative Commons / Attribution 3.0 United States [CC BY 3.0 US](https://creativecommons.org/licenses/by/3.0/us/):\n    - By [Arthur Shlain](https://thenounproject.com/ArtZ91/):\n        - [Shopping Cart](https://thenounproject.com/icon/139181/ \"link to original image\") | Retrieved on 2016-07-13.\n        - [Toilet Paper](https://thenounproject.com/icon/79500/ \"link to original image\") | Retrieved on 2016-07-13.\n        - [Band Aid](https://thenounproject.com/icon/79529/ \"link to original image\") | Retrieved on 2016-07-13.\n        - [Toilet](https://thenounproject.com/icon/124048/ \"link to original image\") | Retrieved on 2016-07-13.\n        - [Wrench](https://thenounproject.com/icon/144983/ \"link to original image\") | Retrieved on 2016-07-13.\n    - By [Mikhail Iskandarov](https://thenounproject.com/iskmisha/): [Toilet Paper](https://thenounproject.com/icon/110942/ \"link to original image\") | Retrieved on 2016-07-13.\n    - By [Vicons Design](https://thenounproject.com/ViconsDesign):\n        - [ATM Withdrawal](https://thenounproject.com/icon/370580/ \"link to original image\") | Retrieved on 2016-07-13.\n        - [Bank](https://thenounproject.com/icon/370631/ \"link to original image\") | Retrieved on 2016-07-13.\n    - By [Greg Beck](https://thenounproject.com/gbeck419/): [Health Foods](https://thenounproject.com/icon/105409/ \"link to original image\") | Retrieved on 2016-07-13.\n    - By [Martin Lebreton](https://thenounproject.com/Martin%20LEBRETON/): [Grocery Basket](https://thenounproject.com/icon/176841/ \"link to original image\") | Retrieved on 2016-07-13.\n    - By [MD Delwar Hossain](https://thenounproject.com/delwar_ctgbd/):\n        - [Hammer](https://thenounproject.com/icon/539512/ \"link to original image\") | Retrieved on 2016-07-16.\n        - [Hammer](https://thenounproject.com/icon/539514/ \"link to original image\") | Retrieved on 2016-07-16.\n        - [Screwdriver](https://thenounproject.com/icon/539515/ \"link to original image\") | Retrieved on 2016-07-16.\n    - By [Ricardo Moreira](https://thenounproject.com/skatakila/): [Tools](https://thenounproject.com/icon/12635/ \"link to original image\") | Retrieved on 2016-07-16.\n    - By [useiconic.com](https://thenounproject.com/useiconic.com/):\n        - [Screwdriver](https://thenounproject.com/icon/45421/ \"link to original image\") | Retrieved on 2016-07-16.\n        - [Pencil](https://thenounproject.com/icon/45487/ \"link to original image\") | Retrieved on 2016-07-16.\n    - By [Stanislav Levin](https://thenounproject.com/brandcut/): [Umbrella](https://thenounproject.com/icon/173087/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Edward Boatman](https://thenounproject.com/edward/): [Umbrella](https://thenounproject.com/icon/142/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Eric Milet](https://thenounproject.com/ericmilet/): [Photographer](https://thenounproject.com/icon/17351/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Eva Verbeek](https://thenounproject.com/evaverbeek/): [Charger](https://thenounproject.com/icon/137625/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Anbileru Adaleru](https://thenounproject.com/pronoun/): [Charger](https://thenounproject.com/icon/101470/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Gregor Črešnar](https://thenounproject.com/grega.cresnar/): [Charger](https://thenounproject.com/icon/547534/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Clair Jones](https://thenounproject.com/hivernoir/): [Adapter](https://thenounproject.com/icon/36303/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Ed Harrison](https://thenounproject.com/edharrison89/): [Bunk Beds](https://thenounproject.com/icon/187619/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Krisada](https://thenounproject.com/Krisada/): [Museum](https://thenounproject.com/icon/78475/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Jakob Vogel](https://thenounproject.com/jakobvogel/): [Parachute](https://thenounproject.com/icon/28223/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Juan Pablo Bravo](https://thenounproject.com/bravo/): [Skydiving](https://thenounproject.com/icon/26955/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Creative Stall](https://thenounproject.com/creativestall/): [Waiter](https://thenounproject.com/icon/130519/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Pieter J. Smits](https://thenounproject.com/pjsmits/): [Lake](https://thenounproject.com/icon/16107/ \"link to original image\") | Retrieved on 2016-07-23.\n    - By [Icon Island](https://thenounproject.com/iconisland/): [Sunglasses](https://thenounproject.com/icon/326819/ \"link to original image\") | Retrieved on 2016-07-24.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaychimo%2Fpictobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaychimo%2Fpictobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaychimo%2Fpictobot/lists"}