{"id":19605238,"url":"https://github.com/macket/inspector_habit_bot","last_synced_at":"2025-09-13T14:20:42.967Z","repository":{"id":101868813,"uuid":"189866003","full_name":"Macket/inspector_habit_bot","owner":"Macket","description":"Inspector Habit helps people to develop good habits and break bad ones, fining them for laziness and weakness.","archived":false,"fork":false,"pushed_at":"2021-01-22T15:46:40.000Z","size":2169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T08:02:31.207Z","etag":null,"topics":["python","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/inspector_habit_bot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Macket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-06-02T15:53:43.000Z","updated_at":"2021-01-22T15:46:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fcbc22de-e075-4f41-848c-0de2b79a5a99","html_url":"https://github.com/Macket/inspector_habit_bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Macket/inspector_habit_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macket%2Finspector_habit_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macket%2Finspector_habit_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macket%2Finspector_habit_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macket%2Finspector_habit_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Macket","download_url":"https://codeload.github.com/Macket/inspector_habit_bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macket%2Finspector_habit_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274976477,"owners_count":25384284,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["python","telegram-bot"],"created_at":"2024-11-11T09:42:02.861Z","updated_at":"2025-09-13T14:20:42.949Z","avatar_url":"https://github.com/Macket.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inspector Habit\n\nInspector Habit is a Telegram bot which helps people to develop good habits and break bad ones, fining them for laziness and weakness.\n\n\n## Getting Started\n\nInspector Habit bot requires Python 3.7 and packages specified in ```requirements.txt```.\n\nYou can install them with\n\n```\npip install -r requirements.txt\n```\n\nBefore you start Inspector Habit it is necessary to create ```.env``` file:\n\n```\ntouch .env\n```\n\nand fill in this file according to the example below:\n\n```\nDEBUG = True\n\nBOT_TOKEN = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nADMIN_ID = XXXXXXXXXXX\n\nDATABASE_URL = postgres://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\nDB_NAME = inspector_habit_db\nDB_USER = user\nDB_PASSWORD = XXXXXXXXXXX\nDB_HOST = localhost\n\nPROXY = https://XXX.XXX.XXX.XXX:XXXX\n\nPROVIDER_TOKEN = XXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n```\n\n```DEBUG``` should be **False** in prod\n\n```BOT_TOKEN``` is the token got from [BotFather](https://t.me/BotFather)\n\n```ADMIN_ID``` is the telegram id of the admin\n\n```DATABASE_URL``` is used to access the database in prod\n\n```DB_NAME```, ```DB_USER```, ```DB_PASSWORD``` and  ```DB_HOST```  are used to access the database in dev\n\n```PROXY``` is used if Telegram is blocked in your country (also uncomment appropriate code in ***bot.py***)\n\n```PROVIDER_TOKEN``` is used for payments (see ***fines/payments***), you can connect the payment provider to your bot via [BotFather](https://t.me/BotFather)\n\nThen you can start Inspector Habit with this command:\n\n```\npython main.py\n```\n\n\n## Use case\n\nLet's see how [the Dude](https://en.wikipedia.org/wiki/The_Big_Lebowski) could discipline himself with Inspector Habit and of course [Walter](https://en.wikipedia.org/wiki/The_Big_Lebowski).\n\nFirst of all, the Dude starts Inspector Habit and assigns the habit he wants to develop.\n\n![1](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/1.png)\n\nThen he chooses days and time for checks, specifies his timezone and selects the amount of the fine.\n\n![2](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/2.png)\n\nAlso the Dude has to choose where his money will go: to a friend or to charity.\n\n![3](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/3.png)\n\nOf course, the Dude chooses **To a friend**.\n\n![4](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/4.png)\n\nAnd asks Walter to become his judge.\n\n![5](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/5.png)\n\nWhen Walter becomes the judge he can also **Sign up** to develop his own habits.\n\n![6](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/6.png)\n\nThe Dude gets notified about it and now he can see the menu.\n\n![7](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/7.png)\n\n![8](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/8.png)\n\nWhen check time is coming, the Dude gets the following message from Inspector Habit.\n\n![9](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/9.png)\n\nIt seems that he overslept and Walter is trying to remind the Dude about his promise.\n\n![10](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/10.png)\n\n![11](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/11.png)\n\nBut it's too late. Dude taps **❌ No** and gets fined.\n\n![12](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/12.png)\n\nIf the Dude forgets to pay fine, Walter will remind him.\n\n![13](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/13.png)\n\n![14](https://raw.githubusercontent.com/Macket/inspector_habit_bot/master/img/readme/14.png)\n\nOnce the Dude pays, Walter taps **💰 Fines paid** and everything goes on.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacket%2Finspector_habit_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacket%2Finspector_habit_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacket%2Finspector_habit_bot/lists"}