{"id":17762100,"url":"https://github.com/thepushkarp/impersonator","last_synced_at":"2025-07-02T09:35:14.006Z","repository":{"id":39628286,"uuid":"359206977","full_name":"thepushkarp/Impersonator","owner":"thepushkarp","description":"A Telegram bot that takes in an exported WhatsApp chat and uses it to send you text in your and your friend's writing style 😎","archived":false,"fork":false,"pushed_at":"2025-06-30T19:57:10.000Z","size":158,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T20:41:55.829Z","etag":null,"topics":["markov-chain","recurrent-neural-networks","rnn","telegram-bot"],"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/thepushkarp.png","metadata":{"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"thepushkarp","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.buymeacoffee.com/thepushkarp"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2021-04-18T17:13:57.000Z","updated_at":"2025-06-30T19:57:07.000Z","dependencies_parsed_at":"2023-02-19T05:55:18.843Z","dependency_job_id":"95741f5e-7278-429b-8f06-48c302870602","html_url":"https://github.com/thepushkarp/Impersonator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thepushkarp/Impersonator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FImpersonator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FImpersonator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FImpersonator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FImpersonator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thepushkarp","download_url":"https://codeload.github.com/thepushkarp/Impersonator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thepushkarp%2FImpersonator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263112202,"owners_count":23415567,"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":["markov-chain","recurrent-neural-networks","rnn","telegram-bot"],"created_at":"2024-10-26T19:52:03.698Z","updated_at":"2025-07-02T09:35:13.982Z","avatar_url":"https://github.com/thepushkarp.png","language":"Python","funding_links":["https://ko-fi.com/thepushkarp","https://www.buymeacoffee.com/thepushkarp"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eImpersonator\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lgtm.com/projects/g/thepushkarp/Impersonator\"\u003e\u003cimg alt=\"LGTM Grade\" src=\"https://img.shields.io/lgtm/grade/python/github/thepushkarp/Impersonator?style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/thepushkarp/Impersonator/issues\"\u003e\u003cimg alt=\"GitHub Issues\" src=\"https://img.shields.io/github/issues/thepushkarp/Impersonator?style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://lgtm.com/projects/g/thepushkarp/Impersonator\"\u003e\u003cimg alt=\"LGTM Alerts\" src=\"https://img.shields.io/lgtm/alerts/github/thepushkarp/Impersonator?style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/thepushkarp/Impersonator/stargazers\"\u003e\u003cimg alt=\"Stargazers\" src=\"https://img.shields.io/github/stars/thepushkarp/Impersonator?style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/thepushkarp/Impersonator/blob/master/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/thepushkarp/Impersonator?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eA Telegram bot that takes in an exported WhatsApp chat and uses it to send you text in your and your friend's writing style 😎\u003c/p\u003e\n\n---\n\n**Disclaimer**: _This project was made for fun to explore the possibilities of text generation. DO NOT use this with somebody's data without their proper consent._\n\nImpersonator can generate texts in two ways:\n\n-   The `/impersonate` command uses Markov Chains\n-   The `/impersonate2` command uses Character Level RNNs\n\nNOTE: Currently tested only for WhatsApp Chats exported from Android.\n\n## How to run?\n\n-   Run `pip install -r requirements.txt`\n-   Place the exported chat in the root folder as `chats.txt`.\n-   Add the names of people who you want to personate using the bot in a new line in `user_names.txt`, as they appear in your exported chat.\n    Ex: If you have someone's number saved as 'Birdy Bro 2', add this full name in the file.\n-   Run `python clean.py` to clean the chat file.\n-   Then run the impersonator version that you want to use\n    -   To impersonate using Markov Chains, run `create_markov.py` (Recommended).\n    -   To impersonate using RNN, follow [this Colab link](https://colab.research.google.com/drive/1lRsuBCVRzl8zu8lxuGyron9tqt3h5heM?usp=sharing) to generate the text files and then save them offline (Optional and less stable than Markov Chains).\n-   In the `.env` file, add the Telegram Bot token you get from [BotFather](https://core.telegram.org/bots#6-botfather) and your your Heroku WebHook URL for deploying this.\n-   Deploy to [Heroku](https://devcenter.heroku.com/articles/getting-started-with-python).\n-   Have Fun impersonating 🖖.\n\n## Thanks\n\n-   [Filip Hracek](https://github.com/filiph) who created the [Automatic Donald Trump](https://filiph.github.io/markov/) which was the inspiration for this project.\n-   [Max Woolf](https://github.com/minimaxir) who developed [textgenrnn](https://github.com/minimaxir/textgenrnn) that uses Character-level RNNs. Check [here](https://karpathy.github.io/2015/05/21/rnn-effectiveness/) to read more about Karapathy's blog on char-rnn.\n-   [Jeremy Singer-Vine](https://github.com/jsvine) who developed [markovify](https://github.com/jsvine/markovify) that made developing the Markov Chain Models a lot easier.\n-   My friends who extensively tested the initial versions of this and suggesting further improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepushkarp%2Fimpersonator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepushkarp%2Fimpersonator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepushkarp%2Fimpersonator/lists"}