{"id":13567061,"url":"https://github.com/praw-dev/prawtools","last_synced_at":"2025-04-04T01:30:57.388Z","repository":{"id":2207954,"uuid":"3156929","full_name":"praw-dev/prawtools","owner":"praw-dev","description":"A collection of tools that interact with reddit's API providing moderator utilities, subreddit statistics, and keyword alerts.","archived":true,"fork":false,"pushed_at":"2022-12-19T15:30:14.000Z","size":832,"stargazers_count":114,"open_issues_count":4,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-14T06:49:20.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/praw-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-11T20:12:40.000Z","updated_at":"2023-06-09T06:13:23.000Z","dependencies_parsed_at":"2023-01-13T11:42:06.551Z","dependency_job_id":null,"html_url":"https://github.com/praw-dev/prawtools","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praw-dev%2Fprawtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praw-dev%2Fprawtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praw-dev%2Fprawtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praw-dev%2Fprawtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/praw-dev","download_url":"https://codeload.github.com/praw-dev/prawtools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107816,"owners_count":20884793,"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":[],"created_at":"2024-08-01T13:02:22.722Z","updated_at":"2025-04-04T01:30:56.935Z","avatar_url":"https://github.com/praw-dev.png","language":"Python","readme":"# BBOE's PRAWtools\n\nPRAWtools is a collection of tools that utilize reddit's API through\n[PRAW](https://praw.readthedocs.io/). PRAWtools is currently made up of three\nutillities:\n\n* modutils\n* reddit_alert\n* subreddit_stats\n\n## PRAWtools Installation\n\n### Ubuntu/debian installation\n\n    sudo apt-get install python-setuptools\n    sudo easy_install pip\n    sudo pip install prawtools\n\n### Arch Linux installation\n    sudo pacman -S python-pip\n    sudo easy_install pip\n    sudo pip install prawtools\n\n### Mac OS X installation\n\n    sudo easy_install pip\n    sudo pip install prawtools\n\n\n## modutils\n\nmodutils is a tool to assist reddit community moderators in moderating\ntheir community. At present, it is mostly useful for automatically building\nflair templates from existing user flair, however, it can also be used to\nquickly list banned users, contributors, and moderators.\n\n### modutils examples\n\nNote: all examples require you to be a moderator for the subreddit\n\n0. List banned users for subreddit __foo__\n\n        modutils -l banned foo\n\n0. Get current flair for subreddit __bar__\n\n        modutils -f bar\n\n0. Synchronize flair templates with existing flair for subreddit __baz__,\nbuilding non-editable templates for any flair whose flair-text is common among\nat least 2 users.\n\n        modutils --sync --ignore-css --limit=2 baz\n\n0. Send a message to approved submitters of subreddit __blah__. You will be\nprompted for the message, and asked to verify prior to sending the messages.\n\n        modutils --message contributors --subject \"The message subject\" blah\n\n\n## reddit_alert\n\nreddit_alert will notify you when certain keywords are used in comments. For\ninstance, to be notified whenever your username is mentioned you might run it\nas:\n\n    reddit_alert bboe\n\nYou can receive multiple alerts by specifying multiple keywords separated by\nspaces. If you want to be alerted for keyphrases (those containing spaces) you\nmust put quotes around the term:\n\n    reddit_alert bboe praw \"reddit api\"\n\nBy default reddit_alert will only provide links to the same terminal screen (or\ncommand prompt) it's running in. To be notified via a reddit message specify\nthe `-m USER` option:\n\n    reddit_alert -m bboe bboe praw \"reddit_api\"\n\nWhen using the `-m USER` you will be prompted to login.\n\nBy default comments from __all__ subreddits are considered. If you want to\nrestrict the notifications to only a few subreddits use one or more `-s\nSUBREDDIT` options:\n\n    reddit_alert -m bboe -s redditdev -s learnpython bboe praw \"reddit_api\"\n\nFinally, you may want to ignore notifications from certain users. You can use\nthe `-I USER` option to ignore comments from a certain user:\n\n    reddit_alert -m bboe -I bizarrobboe bboe\n\nTo see a complete set of available options run:\n\n    reddit_alert --help\n\n\n## subreddit_stats\n\nsubreddit_stats is a tool to provide basic statistics on a subreddit.\nTo see the what sort of output subreddit stats generates check out\n[/r/subreddit_stats](http://www.reddit.com/r/subreddit_stats).\n\nThe tool will only analyze up to 1,000 submissions.\n\n### Preparation\n\nIn order to run subreddit_stats you will need to create a `praw.ini` file in\nthe same directory that you run the scripts in. This file should look like:\n\n```\n[DEFAULT]\nclient_id: XXX\nclient_secret: XXX\npassword: XXX\nusername: XXX\n```\n\n### subreddit_stats examples\n\n0. Generate stats for subreddit __foo__ for the last 30 days.\n\n        subreddit_stats foo 30\n\nPassing a number, `N`, as the second argument will get all submissions from the\nlast N days, but will ignore submissions from the most recent 24 hours. As a\nresult, you may experience messages like \"No submissions found\". To analyze the\ntop submissions made within the last month run:\n\n        subreddit_stats foo month\n\nSimilarly, to analyze the top submissions to __foo__ over the last year, run:\n\n        subreddit_stats foo year\n\n0. To see other possible options\n\n        subreddit_stats --help\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraw-dev%2Fprawtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraw-dev%2Fprawtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraw-dev%2Fprawtools/lists"}