├── .dockerignore
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.yml
└── workflows
│ ├── autoblack.yml
│ ├── codeql-analysis.yml
│ ├── lint.yml
│ └── stale.yml
├── .gitignore
├── .pylintrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dockerfile
├── GUI.py
├── GUI
├── backgrounds.html
├── index.html
├── layout.html
├── settings.html
└── voices
│ ├── amy.mp3
│ ├── br_001.mp3
│ ├── br_003.mp3
│ ├── br_004.mp3
│ ├── br_005.mp3
│ ├── brian.mp3
│ ├── de_001.mp3
│ ├── de_002.mp3
│ ├── emma.mp3
│ ├── en_au_001.mp3
│ ├── en_au_002.mp3
│ ├── en_uk_001.mp3
│ ├── en_uk_003.mp3
│ ├── en_us_001.mp3
│ ├── en_us_002.mp3
│ ├── en_us_006.mp3
│ ├── en_us_007.mp3
│ ├── en_us_009.mp3
│ ├── en_us_010.mp3
│ ├── en_us_c3po.mp3
│ ├── en_us_chewbacca.mp3
│ ├── en_us_ghostface.mp3
│ ├── en_us_rocket.mp3
│ ├── en_us_stitch.mp3
│ ├── en_us_stormtrooper.mp3
│ ├── es_002.mp3
│ ├── es_mx_002.mp3
│ ├── fr_001.mp3
│ ├── fr_002.mp3
│ ├── geraint.mp3
│ ├── id_001.mp3
│ ├── ivy.mp3
│ ├── joanna.mp3
│ ├── joey.mp3
│ ├── jp_001.mp3
│ ├── jp_003.mp3
│ ├── jp_005.mp3
│ ├── jp_006.mp3
│ ├── justin.mp3
│ ├── kendra.mp3
│ ├── kimberly.mp3
│ ├── kr_002.mp3
│ ├── kr_003.mp3
│ ├── kr_004.mp3
│ ├── matthew.mp3
│ ├── nicole.mp3
│ ├── raveena.mp3
│ ├── russell.mp3
│ └── salli.mp3
├── LICENSE
├── README.md
├── TTS
├── GTTS.py
├── TikTok.py
├── __init__.py
├── aws_polly.py
├── elevenlabs.py
├── engine_wrapper.py
├── pyttsx.py
└── streamlabs_polly.py
├── build.sh
├── fonts
├── LICENSE.txt
├── Roboto-Black.ttf
├── Roboto-Bold.ttf
├── Roboto-Medium.ttf
└── Roboto-Regular.ttf
├── install.sh
├── main.py
├── ptt.py
├── reddit
└── subreddit.py
├── requirements.txt
├── run.bat
├── run.sh
├── utils
├── .config.template.toml
├── __init__.py
├── ai_methods.py
├── background_audios.json
├── background_videos.json
├── cleanup.py
├── console.py
├── ffmpeg_install.py
├── gui_utils.py
├── id.py
├── imagenarator.py
├── playwright.py
├── posttextparser.py
├── settings.py
├── subreddit.py
├── thumbnail.py
├── version.py
├── videos.py
└── voice.py
└── video_creation
├── __init__.py
├── background.py
├── data
├── cookie-dark-mode.json
└── cookie-light-mode.json
├── final_video.py
├── screenshot_downloader.py
└── voices.py
/.dockerignore:
--------------------------------------------------------------------------------
1 | Dockerfile
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | title: "[Bug]: "
3 | labels: bug
4 | description: Report broken or incorrect behaviour
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: >
9 | Thanks for taking the time to fill out a bug.
10 | Please note that this form is for bugs only!
11 | - type: textarea
12 | id: what-happened
13 | attributes:
14 | label: Describe the bug
15 | description: A clear and concise description of what the bug is.
16 | validations:
17 | required: true
18 | - type: textarea
19 | attributes:
20 | label: Reproduction Steps
21 | description: >
22 | What you did to make it happen.
23 | validations:
24 | required: true
25 | - type: textarea
26 | attributes:
27 | label: Expected behavior
28 | description: >
29 | A clear and concise description of what you expected to happen.
30 | validations:
31 | required: true
32 | - type: textarea
33 | attributes:
34 | label: Screenshots
35 | description: >
36 | If applicable, add screenshots to help explain your problem.
37 | validations:
38 | required: false
39 | - type: textarea
40 | attributes:
41 | label: System Information
42 | description: please fill your system informations
43 | value: >
44 | Operating System : [e.g. Windows 11]
45 |
46 | Python version : [e.g. Python 3.6]
47 |
48 | App version / Branch : [e.g. latest, V2.0, master, develop]
49 | validations:
50 | required: true
51 | - type: checkboxes
52 | attributes:
53 | label: Checklist
54 | description: >
55 | Let's make sure you've properly done due diligence when reporting this issue!
56 | options:
57 | - label: I have searched the open issues for duplicates.
58 | required: true
59 | - label: I have shown the entire traceback, if possible.
60 | required: true
61 | - type: textarea
62 | attributes:
63 | label: Additional Context
64 | description: Add any other context about the problem here.
65 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Ask a question
4 | about: Join our discord server to ask questions and discuss with maintainers and contributors.
5 | url: https://discord.gg/swqtb7AsNQ
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: Suggest an idea for this project
3 | labels: enhancement
4 | title: "[Feature]: "
5 | body:
6 | - type: input
7 | attributes:
8 | label: Summary
9 | description: >
10 | A short summary of what your feature request is.
11 | validations:
12 | required: true
13 | - type: textarea
14 | attributes:
15 | label: Is your feature request related to a problem?
16 | description: >
17 | if yes, what becomes easier or possible when this feature is implemented?
18 | validations:
19 | required: true
20 | - type: textarea
21 | attributes:
22 | label: Describe the solution you'd like
23 | description: >
24 | A clear and concise description of what you want to happen.
25 | validations:
26 | required: true
27 | - type: textarea
28 | attributes:
29 | label: Describe alternatives you've considered
30 | description: >
31 | A clear and concise description of any alternative solutions or features you've considered.
32 | validations:
33 | required: false
34 |
35 |
36 | - type: textarea
37 | attributes:
38 | label: Additional Context
39 | description: Add any other context or screenshots about the feature request here.
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Description
2 |
3 |
4 |
5 | # Issue Fixes
6 |
7 |
8 |
9 | None
10 |
11 | # Checklist:
12 |
13 | - [ ] I am pushing changes to the **develop** branch
14 | - [ ] I am using the recommended development environment
15 | - [ ] I have performed a self-review of my own code
16 | - [ ] I have commented my code, particularly in hard-to-understand areas
17 | - [ ] I have formatted and linted my code using python-black and pylint
18 | - [ ] I have cleaned up unnecessary files
19 | - [ ] My changes generate no new warnings
20 | - [ ] My changes follow the existing code-style
21 | - [ ] My changes are relevant to the project
22 |
23 | # Any other information (e.g how to test the changes)
24 |
25 | None
26 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "pip" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "daily"
12 | target-branch: "develop"
13 |
--------------------------------------------------------------------------------
/.github/workflows/autoblack.yml:
--------------------------------------------------------------------------------
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: ["develop"]
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 github-actions
28 | git config --global user.email 41898282+github-actions[bot]@users.noreply.github.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 origin HEAD:develop
33 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 |
2 | # For most projects, this workflow file will not need changing; you simply need
3 | # to commit it to your repository.
4 | #
5 | # You may wish to alter this file to override the set of languages analyzed,
6 | # or to provide custom queries or build logic.
7 | #
8 | # ******** NOTE ********
9 | # We have attempted to detect the languages in your repository. Please check
10 | # the `language` matrix defined below to confirm you have the correct set of
11 | # supported CodeQL languages.
12 | #
13 | name: "CodeQL"
14 |
15 | on:
16 | push:
17 | branches: [ "master", "develop" ]
18 | pull_request:
19 | # The branches below must be a subset of the branches above
20 | branches: [ "master", "develop" ]
21 | schedule:
22 | - cron: '16 14 * * 3'
23 |
24 | jobs:
25 | analyze:
26 | name: Analyze
27 | runs-on: ubuntu-latest
28 | permissions:
29 | actions: read
30 | contents: read
31 | security-events: write
32 |
33 | strategy:
34 | fail-fast: false
35 | matrix:
36 | language: [ 'python' ]
37 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
38 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
39 |
40 | steps:
41 | - name: Checkout repository
42 | uses: actions/checkout@v3
43 |
44 | # Initializes the CodeQL tools for scanning.
45 | - name: Initialize CodeQL
46 | uses: github/codeql-action/init@v2
47 | with:
48 | languages: ${{ matrix.language }}
49 | # If you wish to specify custom queries, you can do so here or in a config file.
50 | # By default, queries listed here will override any specified in a config file.
51 | # Prefix the list here with "+" to use these queries and those in the config file.
52 |
53 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
54 | # queries: security-extended,security-and-quality
55 |
56 |
57 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
58 | # If this step fails, then you should remove it and run the build manually (see below)
59 | - name: Autobuild
60 | uses: github/codeql-action/autobuild@v2
61 |
62 | # ℹ️ Command-line programs to run using the OS shell.
63 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
64 |
65 | # If the Autobuild fails above, remove it and uncomment the following three lines.
66 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
67 |
68 | # - run: |
69 | # echo "Run, Build Application using script"
70 | # ./location_of_script_within_repo/buildscript.sh
71 |
72 | - name: Perform CodeQL Analysis
73 | uses: github/codeql-action/analyze@v2
74 |
--------------------------------------------------------------------------------
/.github/workflows/lint.yml:
--------------------------------------------------------------------------------
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"
13 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | name: 'Stale issue handler'
2 | on:
3 | workflow_dispatch:
4 | schedule:
5 | - cron: '0 0 * * *'
6 |
7 | jobs:
8 |
9 | stale:
10 | runs-on: ubuntu-latest
11 | permissions:
12 | issues: write
13 | pull-requests: write
14 | steps:
15 | - uses: actions/stale@v9
16 | id: stale-issue
17 | name: stale-issue
18 | with:
19 | # general settings
20 | repo-token: ${{ secrets.GITHUB_TOKEN }}
21 | 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.'
22 | close-issue-message: 'Issue closed due to being stale. Please reopen if issue persists in latest version.'
23 | days-before-stale: 6
24 | days-before-close: 12
25 | stale-issue-label: 'stale'
26 | close-issue-label: 'outdated'
27 | exempt-issue-labels: 'enhancement,keep,blocked'
28 | exempt-all-issue-milestones: true
29 | operations-per-run: 300
30 | remove-stale-when-updated: true
31 | ascending: true
32 | #debug-only: true
33 |
34 | - uses: actions/stale@v9
35 | id: stale-pr
36 | name: stale-pr
37 | with:
38 | # general settings
39 | repo-token: ${{ secrets.GITHUB_TOKEN }}
40 | 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.'
41 | close-pr-message: 'Pull request closed due to being stale.'
42 | days-before-stale: 10
43 | days-before-close: 20
44 | close-pr-label: 'outdated'
45 | stale-pr-label: 'stale'
46 | exempt-pr-labels: 'keep,blocked,before next release,after next release'
47 | exempt-all-pr-milestones: true
48 | operations-per-run: 300
49 | remove-stale-when-updated: true
50 | #debug-only: true
51 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | share/python-wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .nox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | *.py,cover
50 | .hypothesis/
51 | .pytest_cache/
52 | cover/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | .pybuilder/
76 | target/
77 |
78 | # Jupyter Notebook
79 | .ipynb_checkpoints
80 |
81 | # IPython
82 | profile_default/
83 | ipython_config.py
84 |
85 | # pyenv
86 | # For a library or package, you might want to ignore these files since the code is
87 | # intended to run in multiple environments; otherwise, check them in:
88 | # .python-version
89 |
90 | # pipenv
91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
94 | # install all needed dependencies.
95 | #Pipfile.lock
96 |
97 | # poetry
98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99 | # This is especially recommended for binary packages to ensure reproducibility, and is more
100 | # commonly ignored for libraries.
101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102 | #poetry.lock
103 |
104 | # pdm
105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106 | #pdm.lock
107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108 | # in version control.
109 | # https://pdm.fming.dev/#use-with-ide
110 | .pdm.toml
111 |
112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113 | __pypackages__/
114 |
115 | # Celery stuff
116 | celerybeat-schedule
117 | celerybeat.pid
118 |
119 | # SageMath parsed files
120 | *.sage.py
121 |
122 | # Environments
123 | .env
124 | .venv
125 | env/
126 | venv/
127 | ENV/
128 | env.bak/
129 | venv.bak/
130 |
131 | # Spyder project settings
132 | .spyderproject
133 | .spyproject
134 |
135 | # Rope project settings
136 | .ropeproject
137 |
138 | # mkdocs documentation
139 | /site
140 |
141 | # mypy
142 | .mypy_cache/
143 | .dmypy.json
144 | dmypy.json
145 |
146 | # Pyre type checker
147 | .pyre/
148 |
149 | # pytype static type analyzer
150 | .pytype/
151 |
152 | # Cython debug symbols
153 | cython_debug/
154 |
155 | # PyCharm
156 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
157 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
158 |
159 | # User-specific stuff
160 | .idea/**/workspace.xml
161 | .idea/**/tasks.xml
162 | .idea/**/usage.statistics.xml
163 | .idea/**/dictionaries
164 | .idea/**/shelf
165 |
166 | # AWS User-specific
167 | .idea/**/aws.xml
168 |
169 | # Generated files
170 | .idea/**/contentModel.xml
171 |
172 | # Sensitive or high-churn files
173 | .idea/**/dataSources/
174 | .idea/**/dataSources.ids
175 | .idea/**/dataSources.local.xml
176 | .idea/**/sqlDataSources.xml
177 | .idea/**/dynamic.xml
178 | .idea/**/uiDesigner.xml
179 | .idea/**/dbnavigator.xml
180 |
181 | # Gradle
182 | .idea/**/gradle.xml
183 | .idea/**/libraries
184 |
185 | # Gradle and Maven with auto-import
186 | # When using Gradle or Maven with auto-import, you should exclude module files,
187 | # since they will be recreated, and may cause churn. Uncomment if using
188 | # auto-import.
189 | # .idea/artifacts
190 | # .idea/compiler.xml
191 | # .idea/jarRepositories.xml
192 | # .idea/modules.xml
193 | # .idea/*.iml
194 | # .idea/modules
195 | # *.iml
196 | # *.ipr
197 |
198 | # CMake
199 | cmake-build-*/
200 |
201 | # Mongo Explorer plugin
202 | .idea/**/mongoSettings.xml
203 |
204 | # File-based project format
205 | *.iws
206 |
207 | # IntelliJ
208 | out/
209 |
210 | # mpeltonen/sbt-idea plugin
211 | .idea_modules/
212 |
213 | # JIRA plugin
214 | atlassian-ide-plugin.xml
215 |
216 | # Cursive Clojure plugin
217 | .idea/replstate.xml
218 |
219 | # SonarLint plugin
220 | .idea/sonarlint/
221 |
222 | # Crashlytics plugin (for Android Studio and IntelliJ)
223 | com_crashlytics_export_strings.xml
224 | crashlytics.properties
225 | crashlytics-build.properties
226 | fabric.properties
227 |
228 | # Editor-based Rest Client
229 | .idea/httpRequests
230 |
231 | # Android studio 3.1+ serialized cache file
232 | .idea/caches/build_file_checksums.ser
233 |
234 | assets/
235 | /.vscode
236 | out
237 | .DS_Store
238 | .setup-done-before
239 | results/*
240 | reddit-bot-351418-5560ebc49cac.json
241 | /.idea
242 | *.pyc
243 | video_creation/data/videos.json
244 | video_creation/data/envvars.txt
245 |
246 | config.toml
247 | *.exe
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | - Demonstrating empathy and kindness toward other people
21 | - Being respectful of differing opinions, viewpoints, and experiences
22 | - Giving and gracefully accepting constructive feedback
23 | - Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | - Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | - The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | - Trolling, insulting or derogatory comments, and personal or political attacks
33 | - Public or private harassment
34 | - Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | - Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at the [discord server](https://discord.gg/yqNvvDMYpq).
63 | All complaints will be reviewed and investigated promptly and fairly.
64 |
65 | All community leaders are obligated to respect the privacy and security of the
66 | reporter of any incident.
67 |
68 | ## Enforcement Guidelines
69 |
70 | Community leaders will follow these Community Impact Guidelines in determining
71 | the consequences for any action they deem in violation of this Code of Conduct:
72 |
73 | ### 1. Correction
74 |
75 | **Community Impact**: Use of inappropriate language or other behavior deemed
76 | unprofessional or unwelcome in the community.
77 |
78 | **Consequence**: A private, written warning from community leaders, providing
79 | clarity around the nature of the violation and an explanation of why the
80 | behavior was inappropriate. A public apology may be requested.
81 |
82 | ### 2. Warning
83 |
84 | **Community Impact**: A violation through a single incident or series
85 | of actions.
86 |
87 | **Consequence**: A warning with consequences for continued behavior. No
88 | interaction with the people involved, including unsolicited interaction with
89 | those enforcing the Code of Conduct, for a specified period of time. This
90 | includes avoiding interactions in community spaces as well as external channels
91 | like social media. Violating these terms may lead to a temporary or
92 | permanent ban.
93 |
94 | ### 3. Temporary Ban
95 |
96 | **Community Impact**: A serious violation of community standards, including
97 | sustained inappropriate behavior.
98 |
99 | **Consequence**: A temporary ban from any sort of interaction or public
100 | communication with the community for a specified period of time. No public or
101 | private interaction with the people involved, including unsolicited interaction
102 | with those enforcing the Code of Conduct, is allowed during this period.
103 | Violating these terms may lead to a permanent ban.
104 |
105 | ### 4. Permanent Ban
106 |
107 | **Community Impact**: Demonstrating a pattern of violation of community
108 | standards, including sustained inappropriate behavior, harassment of an
109 | individual, or aggression toward or disparagement of classes of individuals.
110 |
111 | **Consequence**: A permanent ban from any sort of public interaction within
112 | the community.
113 |
114 | ## Attribution
115 |
116 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117 | version 2.0, available at
118 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
119 |
120 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
121 | enforcement ladder](https://github.com/mozilla/diversity).
122 |
123 | [homepage]: https://www.contributor-covenant.org
124 |
125 | For answers to common questions about this code of conduct, see the FAQ at
126 | https://www.contributor-covenant.org/faq. Translations are available at
127 | https://www.contributor-covenant.org/translations.
128 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | # Contributing to Reddit Video Maker Bot 🎥
3 |
4 | Thanks for taking the time to contribute! ❤️
5 |
6 | All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for the maintainers and smooth out the experience for all involved. We are looking forward to your contributions. 🎉
7 |
8 | > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
9 | >
10 | > - ⭐ Star the project
11 | > - 📣 Tweet about it
12 | > - 🌲 Refer this project in your project's readme
13 |
14 | ## Table of Contents
15 |
16 | - [Contributing to Reddit Video Maker Bot 🎥](#contributing-to-reddit-video-maker-bot-)
17 | - [Table of Contents](#table-of-contents)
18 | - [I Have a Question](#i-have-a-question)
19 | - [I Want To Contribute](#i-want-to-contribute)
20 | - [Reporting Bugs](#reporting-bugs)
21 | - [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
22 | - [Suggesting Enhancements](#suggesting-enhancements)
23 | - [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
24 | - [Your First Code Contribution](#your-first-code-contribution)
25 | - [Your environment](#your-environment)
26 | - [Making your first PR](#making-your-first-pr)
27 | - [Improving The Documentation](#improving-the-documentation)
28 |
29 | ## I Have a Question
30 |
31 | > If you want to ask a question, we assume that you have read the available [Documentation](https://reddit-video-maker-bot.netlify.app/).
32 |
33 | Before you ask a question, it is best to search for existing [Issues](https://github.com/elebumm/RedditVideoMakerBot/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
34 |
35 | If you then still feel the need to ask a question and need clarification, we recommend the following:
36 |
37 | - Open an [Issue](https://github.com/elebumm/RedditVideoMakerBot/issues/new).
38 | - Provide as much context as you can about what you're running into.
39 | - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
40 |
41 | We will then take care of the issue as soon as possible.
42 |
43 | Additionally, there is a [Discord Server](https://discord.gg/swqtb7AsNQ) for any questions you may have
44 |
45 | ## I Want To Contribute
46 |
47 | ### Reporting Bugs
48 |
49 |
Before Submitting a Bug Report
50 |
51 | A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
52 |
53 | - Make sure that you are using the latest version.
54 | - Determine if your bug is really a bug and not an error on your side e.g., using incompatible environment components/versions (Make sure that you have read the [documentation](https://luka-hietala.gitbook.io/documentation-for-the-reddit-bot/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
55 | - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [issues](https://github.com/elebumm/RedditVideoMakerBot/).
56 | - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue - you probably aren't the first to get the error!
57 | - Collect information about the bug:
58 | - Stack trace (Traceback) - preferably formatted in a code block.
59 | - OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
60 | - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
61 | - Your input and the output
62 | - Is the issue reproducible? Does it exist in previous versions?
63 |
64 | #### How Do I Submit a Good Bug Report?
65 |
66 | We use GitHub issues to track bugs and errors. If you run into an issue with the project:
67 |
68 | - Open an [Issue](https://github.com/elebumm/RedditVideoMakerBot/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
69 | - Explain the behavior you would expect and the actual behavior.
70 | - Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
71 | - Provide the information you collected in the previous section.
72 |
73 | Once it's filed:
74 |
75 | - The project team will label the issue accordingly.
76 | - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will try to support you as best as they can, but you may not receive an instant.
77 | - If the team discovers that this is an issue it will be marked `bug` or `error`, as well as possibly other tags relating to the nature of the error), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
78 |
79 |
80 | ### Suggesting Enhancements
81 |
82 | This section guides you through submitting an enhancement suggestion for Reddit Video Maker Bot, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
83 |
84 |
Before Submitting an Enhancement
85 |
86 | - Make sure that you are using the latest version.
87 | - Read the [documentation](https://luka-hietala.gitbook.io/documentation-for-the-reddit-bot/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
88 | - Perform a [search](https://github.com/elebumm/RedditVideoMakerBot/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
89 | - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset.
90 |
91 | #### How Do I Submit a Good Enhancement Suggestion?
92 |
93 | Enhancement suggestions are tracked as [GitHub issues](https://github.com/elebumm/RedditVideoMakerBot/issues).
94 |
95 | - Use a **clear and descriptive title** for the issue to identify the suggestion.
96 | - Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
97 | - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
98 | - You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
99 | - **Explain why this enhancement would be useful** to most users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
100 |
101 |
102 |
103 | ### Your First Code Contribution
104 |
105 | #### Your environment
106 |
107 | You development environment should follow the requirements stated in the [README file](README.md). If you are not using the specified versions, **please reference this in your pull request**, so reviewers can test your code on both versions.
108 |
109 | #### Setting up your development repository
110 |
111 | These steps are only specified for beginner developers trying to contribute to this repository.
112 | If you know how to make a fork and clone, you can skip these steps.
113 |
114 | Before contributing, follow these steps (if you are a beginner)
115 |
116 | - Create a fork of this repository to your personal account
117 | - Clone the repo to your computer
118 | - Make sure that you have all dependencies installed
119 | - Run `python main.py` to make sure that the program is working
120 | - Now, you are all setup to contribute your own features to this repo!
121 |
122 | Even if you are a beginner to working with python or contributing to open source software,
123 | don't worry! You can still try contributing even to the documentation!
124 |
125 | ("Setting up your development repository" was written by a beginner developer themselves!)
126 |
127 |
128 | #### Making your first PR
129 |
130 | When making your PR, follow these guidelines:
131 |
132 | - Your branch has a base of _develop_, **not** _master_
133 | - You are merging your branch into the _develop_ branch
134 | - You link any issues that are resolved or fixed by your changes. (this is done by typing "Fixes #\") in your pull request
135 | - Where possible, you have used `git pull --rebase`, to avoid creating unnecessary merge commits
136 | - You have meaningful commits, and if possible, follow the commit style guide of `type: explanation`
137 | - Here are the commit types:
138 | - **feat** - a new feature
139 | - **fix** - a bug fix
140 | - **docs** - a change to documentation / commenting
141 | - **style** - formatting changes - does not impact code
142 | - **refactor** - refactored code
143 | - **chore** - updating configs, workflows etc - does not impact code
144 |
145 | ### Improving The Documentation
146 |
147 | All updates to the documentation should be made in a pull request to [this repo](https://github.com/LukaHietala/RedditVideoMakerBot-website)
148 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.10.9-slim
2 |
3 | RUN apt update
4 | RUN apt-get install -y ffmpeg
5 | RUN apt install python3-pip -y
6 |
7 | RUN mkdir /app
8 | ADD . /app
9 | WORKDIR /app
10 | RUN pip install -r requirements.txt
11 |
12 | # tricks for pytube : https://github.com/elebumm/RedditVideoMakerBot/issues/142
13 | # (NOTE : This is no longer useful since pytube was removed from the dependencies)
14 | # RUN sed -i 's/re.compile(r"^\\w+\\W")/re.compile(r"^\\$*\\w+\\W")/' /usr/local/lib/python3.8/dist-packages/pytube/cipher.py
15 |
16 | CMD ["python3", "main.py"]
17 |
--------------------------------------------------------------------------------
/GUI.py:
--------------------------------------------------------------------------------
1 | import webbrowser
2 | from pathlib import Path
3 |
4 | # Used "tomlkit" instead of "toml" because it doesn't change formatting on "dump"
5 | import tomlkit
6 | from flask import (
7 | Flask,
8 | redirect,
9 | render_template,
10 | request,
11 | send_from_directory,
12 | url_for,
13 | )
14 |
15 | import utils.gui_utils as gui
16 |
17 | # Set the hostname
18 | HOST = "localhost"
19 | # Set the port number
20 | PORT = 4000
21 |
22 | # Configure application
23 | app = Flask(__name__, template_folder="GUI")
24 |
25 | # Configure secret key only to use 'flash'
26 | app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'
27 |
28 |
29 | # Ensure responses aren't cached
30 | @app.after_request
31 | def after_request(response):
32 | response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
33 | response.headers["Expires"] = 0
34 | response.headers["Pragma"] = "no-cache"
35 | return response
36 |
37 |
38 | # Display index.html
39 | @app.route("/")
40 | def index():
41 | return render_template("index.html", file="videos.json")
42 |
43 |
44 | @app.route("/backgrounds", methods=["GET"])
45 | def backgrounds():
46 | return render_template("backgrounds.html", file="backgrounds.json")
47 |
48 |
49 | @app.route("/background/add", methods=["POST"])
50 | def background_add():
51 | # Get form values
52 | youtube_uri = request.form.get("youtube_uri").strip()
53 | filename = request.form.get("filename").strip()
54 | citation = request.form.get("citation").strip()
55 | position = request.form.get("position").strip()
56 |
57 | gui.add_background(youtube_uri, filename, citation, position)
58 |
59 | return redirect(url_for("backgrounds"))
60 |
61 |
62 | @app.route("/background/delete", methods=["POST"])
63 | def background_delete():
64 | key = request.form.get("background-key")
65 | gui.delete_background(key)
66 |
67 | return redirect(url_for("backgrounds"))
68 |
69 |
70 | @app.route("/settings", methods=["GET", "POST"])
71 | def settings():
72 | config_load = tomlkit.loads(Path("config.toml").read_text())
73 | config = gui.get_config(config_load)
74 |
75 | # Get checks for all values
76 | checks = gui.get_checks()
77 |
78 | if request.method == "POST":
79 | # Get data from form as dict
80 | data = request.form.to_dict()
81 |
82 | # Change settings
83 | config = gui.modify_settings(data, config_load, checks)
84 |
85 | return render_template("settings.html", file="config.toml", data=config, checks=checks)
86 |
87 |
88 | # Make videos.json accessible
89 | @app.route("/videos.json")
90 | def videos_json():
91 | return send_from_directory("video_creation/data", "videos.json")
92 |
93 |
94 | # Make backgrounds.json accessible
95 | @app.route("/backgrounds.json")
96 | def backgrounds_json():
97 | return send_from_directory("utils", "backgrounds.json")
98 |
99 |
100 | # Make videos in results folder accessible
101 | @app.route("/results/")
102 | def results(name):
103 | return send_from_directory("results", name, as_attachment=True)
104 |
105 |
106 | # Make voices samples in voices folder accessible
107 | @app.route("/voices/")
108 | def voices(name):
109 | return send_from_directory("GUI/voices", name, as_attachment=True)
110 |
111 |
112 | # Run browser and start the app
113 | if __name__ == "__main__":
114 | webbrowser.open(f"http://{HOST}:{PORT}", new=2)
115 | print("Website opened in new tab. Refresh if it didn't load.")
116 | app.run(port=PORT)
117 |
--------------------------------------------------------------------------------
/GUI/backgrounds.html:
--------------------------------------------------------------------------------
1 | {% extends "layout.html" %}
2 | {% block main %}
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Delete background
10 |
11 |
12 | Are you sure you want to delete this background?
13 |