Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ RUN mkdir -p /home/vscode/.local/bin && \
chmod +x /home/vscode/.local/bin/yt-dlp && \
chown -R vscode /home/vscode/.local

# Enables preservation of bash history
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
mkdir /commandhistory && \
touch /commandhistory/.bash_history && \
chown -R $USERNAME /commandhistory && \
echo "$SNIPPET" >> "/home/$USERNAME/.bashrc"

USER $USERNAME

ENTRYPOINT ["/bin/bash"]
22 changes: 17 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.globalModuleInstallation": false,
"python.logging.level": "debug",
"python.venvPath": "~/.pyenv",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.analysis.autoSearchPaths": true,
Expand All @@ -41,27 +40,40 @@
"terminal.integrated.gpuAcceleration": "auto",
"terminal.integrated.useWslProfiles": true,
"terminal.integrated.defaultProfile.linux":"bash"
}
},
"extensions": [
"ms-python.python"
]
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
"ms-python.vscode-pylance",
]
},


"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1.2.1": {},
"ghcr.io/devcontainers/features/git:1.1.5": {}
"ghcr.io/devcontainers/features/git:1.1.5": {},
"ghcr.io/devcontainers-contrib/features/twine:2": {},
"ghcr.io/devcontainers-contrib/features/mypy:2": {},
"ghcr.io/devcontainers-contrib/features/isort:2": {},
"ghcr.io/devcontainers-contrib/features/flake8:2": {},
"ghcr.io/devcontainers-contrib/features/black:2": {},
"ghcr.io/devcontainers-contrib/features/bandit:2": {}
},

"mounts": [
"source=projectname-bashhistory,target=/commandhistory,type=volume"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/scripts/postCreateCommand.sh",
"postCreateCommand": "/bin/bash dependencies/scripts/postCreateCommand.sh",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
final/*
config/auth.py
.env
client_secret.json
cookies.json
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:

- name: Run ttsvibelounge Script
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
RYBO_POLLY_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
RYBO_POLLY_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CREDENTIALS_STORAGE: ${{ secrets.CREDENTIALS_STORAGE }}
PRAW_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
PRAW_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
PRAW_USER_AGENT: ${{ secrets.PRAW_USER_AGENT }}
PRAW_USERNAME: ${{ secrets.PRAW_USERNAME }}
PRAW_PASSWORD: ${{ secrets.PRAW_PASSWORD }}
RUMBLE_PASSWORD: ${{ secrets.RUMBLE_PASSWORD }}
RUMBLE_USERNAME: ${{ secrets.RUMBLE_USERNAME }}
RYBO_REDDIT_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
RYBO_REDDIT_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
RYBO_REDDIT_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
RYBO_REDDIT_USERNAME: ${{ secrets.PRAW_USERNAME }}
RYBO_REDDIT_PASSWORD: ${{ secrets.PRAW_PASSWORD }}
RYBO_RUMBLE_PASSWORD: ${{ secrets.RUMBLE_PASSWORD }}
RYBO_RUMBLE_USERNAME: ${{ secrets.RUMBLE_USERNAME }}
YOUTUBE_CLIENT_SECRET: ${{ secrets.YOUTUBE_CLIENT_SECRET }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
Expand All @@ -31,12 +31,13 @@ jobs:
echo $GITHUB_WORKSPACE
echo $YOUTUBE_CLIENT_SECRET > client_secret.json
echo $CREDENTIALS_STORAGE > credentials.storage
cp config/auth-env.py config/auth.py
pip install -r requirements.txt
playwright install
python3 app.py --total-posts 1 \
--enable-background \
--background-directory /app/assets/backgrounds \
--enable-mentions
pip install --editable .
rybo --total-posts 1 \
--enable-background \
--background-directory /app/assets/backgrounds \
--enable-mentions
python3 refresh_token.py
rm -f client_secret.json
rm -f credentials.storage
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/tssvibelounge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:

- name: Run ttsvibelounge Script
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
RYBO_POLLY_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
RYBO_POLLY_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CREDENTIALS_STORAGE: ${{ secrets.CREDENTIALS_STORAGE }}
PRAW_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
PRAW_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
PRAW_USER_AGENT: ${{ secrets.PRAW_USER_AGENT }}
PRAW_USERNAME: ${{ secrets.PRAW_USERNAME }}
PRAW_PASSWORD: ${{ secrets.PRAW_PASSWORD }}
RUMBLE_PASSWORD: ${{ secrets.RUMBLE_PASSWORD }}
RUMBLE_USERNAME: ${{ secrets.RUMBLE_USERNAME }}
RYBO_REDDIT_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
RYBO_REDDIT_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
RYBO_REDDIT_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
RYBO_REDDIT_USERNAME: ${{ secrets.PRAW_USERNAME }}
RYBO_REDDIT_PASSWORD: ${{ secrets.PRAW_PASSWORD }}
RYBO_RUMBLE_PASSWORD: ${{ secrets.RUMBLE_PASSWORD }}
RYBO_RUMBLE_USERNAME: ${{ secrets.RUMBLE_USERNAME }}
YOUTUBE_CLIENT_SECRET: ${{ secrets.YOUTUBE_CLIENT_SECRET }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
Expand All @@ -47,18 +47,18 @@ jobs:
echo $GITHUB_WORKSPACE
echo $YOUTUBE_CLIENT_SECRET > client_secret.json
echo $CREDENTIALS_STORAGE > credentials.storage
cp config/auth-env.py config/auth.py
pip install -r requirements.txt
playwright install
python3 app.py --total-posts 1 \
--enable-upload \
--enable-background \
--background-directory /app/assets/backgrounds \
--enable-mentions
pip install --editable .
rybo --total-posts 1 \
--enable-upload \
--enable-background \
--background-directory /app/assets/backgrounds \
--enable-mentions
python3 refresh_token.py
rm -f client_secret.json
rm -f credentials.storage


- name: check for changes
run: |
git config --global --add safe.directory $(realpath .)
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ client_secret.json
cookies*.json
credentials.storage
videos/
config/auth.py
.env
venv

*.egg-info
**/__pycache__/
assets/work_dir/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Alex Laverty

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading