Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: add cli wrapper #82

Open
nathonfowlie opened this issue May 14, 2023 · 0 comments · May be fixed by #83
Open

improvement: add cli wrapper #82

nathonfowlie opened this issue May 14, 2023 · 0 comments · May be fixed by #83
Assignees
Labels
enhancement New feature or request

Comments

@nathonfowlie
Copy link
Collaborator

Add a wrapper around the existing codebase to bundle it up as a command-line utility.

@nathonfowlie nathonfowlie self-assigned this May 14, 2023
nathonfowlie added a commit to nathonfowlie/python-reddit-youtube-bot that referenced this issue May 14, 2023
Major change to allow the bot to be distributed as a pip package.

app.py has been removed and replaced with a CLI utility called
'rybo'.

Existing video generation, TTS and Reddit post processing logic
has been left as is, however now sits inside the CLI.

Removed auth.py, as credentials are now passed via environment
variables or a YAML configuration file. The default expected
location of the configuration file is `~/rybo.yaml`. A
sample configuration file has been included in the codebase.

ArgParse parameters updated to allow loading of configuration
from the command line, a configuration file, or environment
variables.

The order of precendence for loading configuration options is:

1. Configuration file
2. Environment variables.
3. CLI parameters.

Configuration options provided as CLI parameters will override
the same option provided as an environment variable, and the
environment variable will override the same option provided in
the configuration file.

Replaced all calls to "print" with module specific loggers to
ensure consistent output and facilitate configurable logging
behaviour.

Updated existing GitHub workflows to reflect the new expected
environment variable names.

Updated the readme with instructions on how to use the new CLI.

BREAKING CHANGE: app.py no longer exists, use the `rybo` command.

refs:
  - resolves alexlaverty#82
@nathonfowlie nathonfowlie linked a pull request May 14, 2023 that will close this issue
@nathonfowlie nathonfowlie added the enhancement New feature or request label May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant