Skip to content

Commit 2cfd20b

Browse files
Merge pull request #880 from elebumm/develop
2.3
2 parents 1c01265 + 9008165 commit 2cfd20b

31 files changed

Lines changed: 1315 additions & 662 deletions

.config.template.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[reddit.creds]
2+
client_id = { optional = false, nmin = 12, nmax = 30, explanation = "the ID of your Reddit app of SCRIPT type", example = "fFAGRNJru1FTz70BzhT3Zg", regex = "^[-a-zA-Z0-9._~+/]+=*$", input_error = "The client ID can only contain printable characters.", oob_error = "The ID should be over 12 and under 30 characters, double check your input." }
3+
client_secret = { optional = false, nmin = 20, nmax = 40, explanation = "the SECRET of your Reddit app of SCRIPT type", example = "fFAGRNJru1FTz70BzhT3Zg", regex = "^[-a-zA-Z0-9._~+/]+=*$", input_error = "The client ID can only contain printable characters.", oob_error = "The secret should be over 20 and under 40 characters, double check your input." }
4+
username = { optional = false, nmin = 3, nmax = 20, explanation = "the username of your reddit account", example = "JasonLovesDoggo", regex = "^[-_0-9a-zA-Z]+$", oob_error = "A username HAS to be between 3 and 20 characters" }
5+
password = { optional = false, nmin = 8, explanation = "the password of your reddit account", example = "fFAGRNJru1FTz70BzhT3Zg", oob_error = "Password too short" }
6+
2fa = { optional = true, type = "bool", options = [true,
7+
false,
8+
], default = false, explanation = "Whether you have Reddit 2FA enabled, Valid options are True and False", example = true }
9+
10+
11+
[reddit.thread]
12+
random = { optional = true, options = [true,
13+
false,
14+
], default = false, type = "bool", explanation = "If set to no, it will ask you a thread link to extract the thread, if yes it will randomize it. Default: 'False'", example = "True" }
15+
subreddit = { optional = false, regex = "[_0-9a-zA-Z]+$", nmin = 3, explanation = "what subreddit to pull posts from, the name of the sub, not the URL", example = "AskReddit", oob_error = "A subreddit name HAS to be between 3 and 20 characters" }
16+
post_id = { optional = true, default = "", regex = "^((?!://|://)[+a-zA-Z])*$", explanation = "Used if you want to use a specific post.", example = "urdtfx" }
17+
max_comment_length = { default = 500, optional = false, nmin = 10, nmax = 10000, type = "int", explanation = "max number of characters a comment can have. default is 500", example = 500, oob_error = "the max comment length should be between 10 and 10000" }
18+
post_lang = { default = "", optional = true, explanation = "The language you would like to translate to.", example = "es-cr" }
19+
min_comments = { default = 20, optional = false, nmin = 15, type = "int", explanation = "The minimum number of comments a post should have to be included. default is 20", example = 29, oob_error = "the minimum number of comments should be between 15 and 999999" }
20+
[settings]
21+
allow_nsfw = { optional = false, type = "bool", default = false, example = false, options = [true,
22+
false,
23+
], explanation = "Whether to allow NSFW content, True or False" }
24+
theme = { optional = false, default = "dark", example = "light", options = ["dark",
25+
"light",
26+
], explanation = "sets the Reddit theme, either LIGHT or DARK" }
27+
times_to_run = { optional = false, default = 1, example = 2, explanation = "used if you want to run multiple times. set to an int e.g. 4 or 29 or 1", type = "int", nmin = 1, oob_error = "It's very hard to run something less than once." }
28+
opacity = { optional = false, default = 0.9, example = 0.8, explanation = "Sets the opacity of the comments when overlayed over the background", type = "float", nmin = 0, nmax = 1, oob_error = "The opacity HAS to be between 0 and 1", input_error = "The opacity HAS to be a decimal number between 0 and 1" }
29+
storymode = { optional = true, type = "bool", default = false, example = false, options = [true,
30+
false,
31+
], explanation = "not yet implemented" }
32+
33+
[settings.background]
34+
background_choice = { optional = true, default = "minecraft", example = "minecraft", options = ["minecraft", "gta", "rocket-league", "motor-gta", ""], explanation = "Sets the background for the video" }
35+
#background_audio = { optional = true, type = "bool", default = false, example = false, options = [true,
36+
# false,
37+
#], explaination="Sets a audio to play in the background (put a background.mp3 file in the assets/backgrounds directory for it to be used.)" }
38+
#background_audio_volume = { optional = true, type = "float", default = 0.3, example = 0.1, explanation="Sets the volume of the background audio. only used if the background_audio is also set to true" }
39+
40+
41+
[settings.tts]
42+
choice = { optional = false, default = "", options = ["streamlabspolly", "tiktok", "googletranslate", "awspolly", ], example = "streamlabspolly", explanation = "The backend used for TTS generation. This can be left blank and you will be prompted to choose at runtime." }
43+
aws_polly_voice = { optional = false, default = "Matthew", example = "Matthew", explanation = "The voice used for AWS Polly" }
44+
streamlabs_polly_voice = { optional = false, default = "Matthew", example = "Matthew", explanation = "The voice used for Streamlabs Polly" }
45+
tiktok_voice = { optional = false, default = "en_us_006", example = "en_us_006", explanation = "The voice used for TikTok TTS" }

.env.template

Lines changed: 0 additions & 86 deletions
This file was deleted.

.github/workflows/autoblack.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# GitHub Action that uses Black to reformat the Python code in an incoming pull request.
2+
# If all Python code in the pull request is compliant with Black then this Action does nothing.
3+
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
4+
# https://github.com/cclauss/autoblack
5+
6+
name: autoblack
7+
on:
8+
push:
9+
branches: ["master"]
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Set up Python 3.7
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.9
19+
- name: Install Black
20+
run: pip install black
21+
- name: Run black --check .
22+
run: black --check .
23+
- name: If needed, commit black changes to the pull request
24+
if: failure()
25+
run: |
26+
black . --line-length 101
27+
git config --global user.name 'autoblack'
28+
git config --global user.email 'jasoncameron.all@gmail.com'
29+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
30+
git checkout $GITHUB_HEAD_REF
31+
git commit -am "fixup: Format Python code with Black"
32+
git push

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ name: "CodeQL"
1414

1515
on:
1616
push:
17-
branches: [ "master" ]
17+
branches: [ "master", "develop" ]
1818
pull_request:
1919
# The branches below must be a subset of the branches above
20-
branches: [ "master" ]
20+
branches: [ "master", "develop" ]
2121
schedule:
2222
- cron: '16 14 * * 3'
2323

.github/workflows/lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: psf/black@stable
11+
with:
12+
options: "--line-length 101"

.github/workflows/stale.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,46 @@ on:
55
- cron: '0 0 * * *'
66

77
jobs:
8+
89
stale:
910
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
1014
steps:
11-
- uses: actions/stale@main
15+
- uses: actions/stale@v4
1216
id: stale-issue
1317
name: stale-issue
1418
with:
19+
# general settings
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}
1521
stale-issue-message: 'This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.'
1622
close-issue-message: 'Issue closed due to being stale. Please reopen if issue persists in latest version.'
17-
days-before-stale: 7
18-
days-before-close: 10
23+
days-before-stale: 6
24+
days-before-close: 12
1925
stale-issue-label: 'stale'
2026
close-issue-label: 'outdated'
2127
exempt-issue-labels: 'enhancement,keep,blocked'
2228
exempt-all-issue-milestones: true
2329
operations-per-run: 300
2430
remove-stale-when-updated: true
25-
26-
- uses: actions/stale@main
31+
ascending: true
32+
#debug-only: true
33+
34+
- uses: actions/stale@v4
2735
id: stale-pr
2836
name: stale-pr
2937
with:
38+
# general settings
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
3040
stale-pr-message: 'This pull request is stale as it has been open for 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.'
3141
close-pr-message: 'Pull request closed due to being stale.'
32-
days-before-stale: 7
33-
days-before-close: 10
42+
days-before-stale: 10
43+
days-before-close: 20
3444
close-pr-label: 'outdated'
3545
stale-pr-label: 'stale'
3646
exempt-pr-labels: 'keep,blocked,before next release,after next release'
3747
exempt-all-pr-milestones: true
3848
operations-per-run: 300
3949
remove-stale-when-updated: true
40-
50+
#debug-only: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,5 @@ reddit-bot-351418-5560ebc49cac.json
241241
*.pyc
242242
video_creation/data/videos.json
243243
video_creation/data/envvars.txt
244+
245+
config.toml

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,16 @@ When making your PR, follow these guidelines:
111111

112112
- Your branch has a base of _develop_, **not** _master_
113113
- You are merging your branch into the _develop_ branch
114-
- You link any issues that are resolved or fixed by your changes. (this is done by typing "Fixes #\<issue number\>") in your pull request.
114+
- You link any issues that are resolved or fixed by your changes. (this is done by typing "Fixes #\<issue number\>") in your pull request
115+
- Where possible, you have used `git pull --rebase`, to avoid creating unnecessary merge commits
116+
- You have meaningful commits, and if possible, follow the commit style guide of `type: explanation`
117+
- Here are the commit types:
118+
- **feat** - a new feature
119+
- **fix** - a bug fix
120+
- **docs** - a change to documentation / commenting
121+
- **style** - formatting changes - does not impact code
122+
- **refactor** - refactored code
123+
- **chore** - updating configs, workflows etc - does not impact code
115124

116125
### Improving The Documentation
117126

0 commit comments

Comments
 (0)