From 20e9d79499ccfbe55a864302309a4853c6a935b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Jul 2022 00:27:00 +0000 Subject: [PATCH 1/7] Bump translators from 5.2.2 to 5.3.1 Bumps [translators](https://github.com/uliontse/translators) from 5.2.2 to 5.3.1. - [Release notes](https://github.com/uliontse/translators/releases) - [Commits](https://github.com/uliontse/translators/commits) --- updated-dependencies: - dependency-name: translators dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4cc217c..c33fd05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ python-dotenv==0.20.0 pytube==12.1.0 requests==2.28.1 rich==12.4.4 -translators==5.2.2 +translators==5.3.1 From 4882feb9195326aa7aaa977fb688e82092f118bb Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 18 Jul 2022 12:48:23 -0400 Subject: [PATCH 2/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8a9e205..54f387d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# I am now pushing directly to https://github.com/elebumm/RedditVideoMakerBot GO THERE. + + # Reddit Video Maker Bot 🎥 All done WITHOUT video editing or asset compiling. Just pure ✨programming magic✨. From 771452544ba0be3d0bb71f3cecd7fe491fff5717 Mon Sep 17 00:00:00 2001 From: PatatjeMC Date: Tue, 19 Jul 2022 16:16:37 +0200 Subject: [PATCH 3/7] Fixed glitchy ending Fixed the issue where the ending freezes for multiple seconds (again cause someone broke my previous fix) --- video_creation/final_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 8524051..6a53c98 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -141,7 +141,7 @@ def make_final_video( ffmpeg_extract_subclip( "assets/temp/temp.mp4", 0, - final.duration, + length, targetname=f"results/{subreddit}/{filename}", ) save_data(subreddit, filename, title, idx, background_config[2]) From 36851dd07b35426d47a58637adc3d0c6ffecfb05 Mon Sep 17 00:00:00 2001 From: PatatjeMC Date: Tue, 19 Jul 2022 16:20:10 +0200 Subject: [PATCH 4/7] Revert "Merge branch 'master' of https://github.com/PatatjeMC/RedditVideoMakerBot" This reverts commit 99656fad6532139b25c661d959c627d83737a056, reversing changes made to 771452544ba0be3d0bb71f3cecd7fe491fff5717. --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 54f387d..8a9e205 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -# I am now pushing directly to https://github.com/elebumm/RedditVideoMakerBot GO THERE. - - # Reddit Video Maker Bot 🎥 All done WITHOUT video editing or asset compiling. Just pure ✨programming magic✨. From 3e084cd8bc4fd94ee18b472fd76c6a9d1d649233 Mon Sep 17 00:00:00 2001 From: RiveN000 <61630074+RiveN000@users.noreply.github.com> Date: Tue, 19 Jul 2022 18:31:53 +0200 Subject: [PATCH 5/7] Created option to add transition between comments Created an option to add a transition (fadein and fadeout) between the images of comments. It makes videos look much more pleasant. --- utils/.config.template.toml | 1 + video_creation/final_video.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/.config.template.toml b/utils/.config.template.toml index 9fd779e..102a813 100644 --- a/utils/.config.template.toml +++ b/utils/.config.template.toml @@ -26,6 +26,7 @@ theme = { optional = false, default = "dark", example = "light", options = ["dar ], explanation = "sets the Reddit theme, either LIGHT or DARK" } 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." } 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" } +transition = { optional = true, default = 0.2, example = 0.2, explanation = "Sets the transition time (in seconds) between the comments. Set to 0 if you want to disable it.", type = "float", nmin = 0, nmax = 2, oob_error = "The transition HAS to be between 0 and 2", input_error = "The opacity HAS to be a decimal number between 0 and 2" } storymode = { optional = true, type = "bool", default = false, example = false, options = [true, false, ], explanation = "not yet implemented" } diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 8d12afe..502c8fc 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -66,6 +66,7 @@ def make_final_video( VideoFileClip.reW = lambda clip: clip.resize(width=W) VideoFileClip.reH = lambda clip: clip.resize(width=H) opacity = settings.config["settings"]["opacity"] + transition = settings.config["settings"]["transition"] background_clip = ( VideoFileClip("assets/temp/background.mp4") .without_audio() @@ -84,12 +85,15 @@ def make_final_video( image_clips = [] # Gather all images new_opacity = 1 if opacity is None or float(opacity) >= 1 else float(opacity) + new_transition = 0 if transition is None or float(transition) > 2 else float(transition) image_clips.insert( 0, ImageClip("assets/temp/png/title.png") .set_duration(audio_clips[0].duration) .resize(width=W - 100) - .set_opacity(new_opacity), + .set_opacity(new_opacity) + .crossfadein(new_transition) + .crossfadeout(new_transition), ) for i in range(0, number_of_clips): @@ -98,6 +102,8 @@ def make_final_video( .set_duration(audio_clips[i + 1].duration) .resize(width=W - 100) .set_opacity(new_opacity) + .crossfadein(new_transition) + .crossfadeout(new_transition) ) # if os.path.exists("assets/mp3/posttext.mp3"): From 8e50522c8046ff0568c9a3773cf36f78cbf2daef Mon Sep 17 00:00:00 2001 From: micziz Date: Tue, 19 Jul 2022 22:06:55 +0200 Subject: [PATCH 6/7] Change the install script 1 --- install.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 782069d..53577de 100644 --- a/install.sh +++ b/install.sh @@ -92,7 +92,10 @@ function install_centos(){ function get_the_bot(){ echo "Downloading the bot" - git clone https://github.com/elebumm/RedditVideoMakerBot.git + rm -rf RedditVideoMakerBot-master + curl -sL https://github.com/elebumm/RedditVideoMakerBot/archive/refs/heads/master.zip -o master.zip + unzip master.zip + rm -rf master.zip } #install python dependencies @@ -100,7 +103,7 @@ function install_python_dep(){ # tell the user that the script is going to install the python dependencies echo "Installing python dependencies" # cd into the directory - cd RedditVideoMakerBot + cd RedditVideoMakerBot-master # install the dependencies pip3 install -r requirements.txt # cd out @@ -112,7 +115,7 @@ function install_playwright(){ # tell the user that the script is going to install playwright echo "Installing playwright" # cd into the directory where the script is downloaded - cd RedditVideoMakerBot + cd RedditVideoMakerBot-master # run the install script python3 -m playwright install python3 -m playwright install-deps @@ -198,9 +201,9 @@ function install_main(){ install_playwright fi - DIR="./RedditVideoMakerBot" + DIR="./RedditVideoMakerBot-master" if [ -d "$DIR" ]; then - printf "\nThe bot is already installed, want to run it?" + printf "\nThe bot is installed, want to run it?" # if -y (assume yes) continue if [[ ASSUME_YES -eq 1 ]]; then echo "Assuming yes" @@ -214,7 +217,7 @@ function install_main(){ exit 1 fi fi - cd RedditVideoMakerBot + cd RedditVideoMakerBot-master python3 main.py fi } From 38fc12ed5c5af33b68add5a0c4ff1736de20f421 Mon Sep 17 00:00:00 2001 From: micziz Date: Tue, 19 Jul 2022 22:07:50 +0200 Subject: [PATCH 7/7] Change the install script 2 --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 53577de..f85c80b 100644 --- a/install.sh +++ b/install.sh @@ -68,26 +68,26 @@ function install_macos(){ # Function to install for arch (and other forks like manjaro) function install_arch(){ echo "Installing required packages" - sudo pacman -S --needed python3 tk git && python3 -m ensurepip || install_fail + sudo pacman -S --needed python3 tk git && python3 -m ensurepip unzip || install_fail } # Function to install for debian (and ubuntu) function install_deb(){ echo "Installing required packages" - sudo apt install python3 python3-dev python3-tk python3-pip git || install_fail + sudo apt install python3 python3-dev python3-tk python3-pip unzip || install_fail } # Function to install for fedora (and other forks) function install_fedora(){ echo "Installing required packages" - sudo dnf install python3 python3-tkinter python3-pip git python3-devel || install_fail + sudo dnf install python3 python3-tkinter python3-pip python3-devel unzip || install_fail } # Function to install for centos (and other forks based on it) function install_centos(){ echo "Installing required packages" sudo yum install -y python3 || install_fail - sudo yum install -y python3-tkinter epel-release python3-pip git || install_fail + sudo yum install -y python3-tkinter epel-release python3-pip unzip|| install_fail } function get_the_bot(){