Skip to content

Commit

Permalink
rename main module
Browse files Browse the repository at this point in the history
  • Loading branch information
git2samus committed Feb 19, 2020
1 parent b189180 commit d237058
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions modules/comments.py 100755 → 100644
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""Reddit SubscriptionBot - Comment Parser
Usage: bot.py comments <subreddit> [(--after=<comment-url>|--reset-after)] [--debug]
bot.py comments -h | --help
Usage: subscription_bot.py comments <subreddit> [(--after=<comment-url>|--reset-after)] [--debug]
subscription_bot.py comments -h | --help
Options:
--after=<comment-url> Only process submissions newer than <comment-url> (if omitted will process any new comment since started)
Expand Down
4 changes: 2 additions & 2 deletions modules/feed.py 100755 → 100644
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""Reddit SubscriptionBot - Feed Parser
Usage: bot.py feed <subreddit> [--sticky] [(--after=<submission-url>|--reset-after)] [--debug]
bot.py feed -h | --help
Usage: subscription_bot.py feed <subreddit> [--sticky] [(--after=<submission-url>|--reset-after)] [--debug]
subscription_bot.py feed -h | --help
Options:
--sticky Whether or not to make bot comments sticky on posts (requires bot permissions on Reddit)
Expand Down
4 changes: 2 additions & 2 deletions modules/inbox.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""Reddit SubscriptionBot - Inbox Parser
Usage: bot.py inbox [--debug]
bot.py inbox -h | --help
Usage: subscription_bot.py inbox [--debug]
subscription_bot.py inbox -h | --help
Options:
--debug Enable HTTP debugging
Expand Down
16 changes: 8 additions & 8 deletions bot.py → subscription_bot.py
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
"""Reddit SubscriptionBot
Usage: bot.py <command> [<args>...]
bot.py -h | --help
bot.py --version
Usage: subscription_bot.py <command> [<args>...]
subscription_bot.py -h | --help
subscription_bot.py --version
Options:
-h, --help Show this screen
Expand All @@ -13,13 +13,13 @@
PRAW_SITE The name of the config section on praw.ini for this process
DATABASE_URL URI of the Postgres instance to use
The bot.py commands are:
The subscription_bot.py commands are:
feed Run the subreddit feed parser and comment on new topics
inbox Run the inbox parser and update subscription lists
comments Run the comment parser and track updates on topics
notifications Send the notifications for the tracked topics
See 'bot.py help <command>' for more information on a specific command.
See 'subscription_bot.py help <command>' for more information on a specific command.
"""
import os
from sys import exit
Expand Down Expand Up @@ -64,11 +64,11 @@
os.execvp('python3', ['python3', f'modules/{help_command}.py', '--help'])

# invalid subcommand
exit(f"{help_command} is not a bot.py command. See 'bot.py help'.")
exit(f"{help_command} is not a subscription_bot.py command. See 'subscription_bot.py help'.")

if command in ('help', None):
# general help
os.execvp('python3', ['python3', 'bot.py', '--help'])
os.execvp('python3', ['python3', 'subscription_bot.py', '--help'])

# invalid subcommand
exit(f"{command} is not a bot.py command. See 'bot.py help'.")
exit(f"{command} is not a subscription_bot.py command. See 'subscription_bot.py help'.")

0 comments on commit d237058

Please sign in to comment.