{"id":19700220,"url":"https://github.com/dbeley/subreddit_tracker","last_synced_at":"2025-02-27T12:39:33.847Z","repository":{"id":40574452,"uuid":"175700074","full_name":"dbeley/subreddit_tracker","owner":"dbeley","description":"Python tool to periodically export usage statistics of a subreddit list in a database.","archived":false,"fork":false,"pushed_at":"2022-12-08T14:34:49.000Z","size":46,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T10:46:10.184Z","etag":null,"topics":["reddit"],"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/dbeley.png","metadata":{"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}},"created_at":"2019-03-14T21:09:52.000Z","updated_at":"2022-12-22T06:11:36.000Z","dependencies_parsed_at":"2023-01-25T13:46:14.596Z","dependency_job_id":null,"html_url":"https://github.com/dbeley/subreddit_tracker","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/dbeley%2Fsubreddit_tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Fsubreddit_tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Fsubreddit_tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Fsubreddit_tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbeley","download_url":"https://codeload.github.com/dbeley/subreddit_tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241014179,"owners_count":19894206,"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":["reddit"],"created_at":"2024-11-11T21:04:49.470Z","updated_at":"2025-02-27T12:39:33.822Z","avatar_url":"https://github.com/dbeley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# subreddit_tracker\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5fbad580efe24b898e80ec7cd64345c9)](https://app.codacy.com/app/dbeley/subreddit_tracker?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=dbeley/subreddit_tracker\u0026utm_campaign=Badge_Grade_Dashboard)\n\nExtract subscribers and live users count of a list of subreddit defined in a csv file or a sqlite database.\n\n## Requirements\n\n- praw\n- working praw config in ~/.config/ (see praw.ini_sample for an example)\n\n## Installation\n\nInstallation in a virtualenv with pipenv (recommended) :\n\n```\npipenv install '-e .'\n```\n\nInstallation in the system-wide environment :\n\n```\npython setup.py install\n```\n\nInstallation in the systemd-wide environment with pip :\n\n```\npip install .\n```\n\n## Usage\n\nGiven a simple txt file subreddit_list.txt\n\n```\nfunny\ngifs\nvideos\n```\n\nYou can then call (depending on the backend you want) :\n\n```\nsubreddit_tracker -f subreddit_list.txt -b csv\nsubreddit_tracker -f subreddit_list.txt -b sqlite\n```\n\n## Autostarting\n\nSystemd services and their respective timers are provided in the systemd-service/ folder.\n\nYou will have to change the service files to launch the script in another directory or to launch it with other options (by default the service files launch the script in a pipenv virtualenv located in the same directory as the script).\n\nThe timer is set to launch the script every 10 minutes.\n\nAfter copying the service and timer files in ~/.config/systemd/user/, you can launch the timer with :\n\n```\nsystemctl --user daemon-reload\nsystemctl --user enable --now subreddit_tracker.timer\nsystemctl --user enable --now subreddit_tracker_sqlite.timer\n```\n\n## Help\n\n```\nsubreddit_tracker -h\n```\n\n```\nusage: subreddit_tracker [-h] [--debug] [-f FILE] [-n NB_THREADS] [-b BACKEND]\n\nExtract subscribers and live users count of a list of subreddit defined in a\ntext file.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -f FILE, --file FILE  File containing the subreddits (Default : sample file\n                        containing popular subreddits)\n  -n NB_THREADS, --nb_threads NB_THREADS\n                        Number of threads to use. Be sure to have\n                        corresponding entries in your praw.ini file\n                        (reddit_bot_1... reddit_bot_N).\n  -b BACKEND, --backend BACKEND\n                        Backend to store the extracted data (sqlite or csv,\n                        Default : csv).\n```\n\n## Threads\n\nYou can use several threads with the -n/--nb_threads argument. Be sure to have corresponding entries in your praw.ini file with different accounts under \\[reddit_bot_2], \\[reddit_bot_3], ... headings.\n\nThe subreddit list will be divided into N sublists. Each of those will be extracted with a separate reddit account to make things faster.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Fsubreddit_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbeley%2Fsubreddit_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Fsubreddit_tracker/lists"}