Morgan Barber 1 year ago
commit b90cbd4fd2

@ -205,7 +205,7 @@
<select name="background_choice" class="form-select" data-toggle="tooltip"
data-original-title='Sets the background of the video'>
<option value=" ">Random Video</option>
{% for background in checks["background_choice"]["options"][1:] %}
{% for background in checks["background_video"]["options"][1:] %}
<option value="{{background}}">{{background}}</option>
{% endfor %}
</select>
@ -618,4 +618,4 @@
});
</script>
{% endblock %}
{% endblock %}

@ -81,7 +81,7 @@ I have tried to simplify the code so anyone can read it and start contributing a
Please read our [contributing guidelines](CONTRIBUTING.md) for more detailed information.
### For any questions or support join the [Discord](https://discord.gg/WBQT52RrHV) server
### For any questions or support join the [Discord](https://discord.gg/Vkanmh6C8V) server
## Developers and maintainers.

@ -14,14 +14,12 @@ from utils import settings
from utils.console import print_step, print_substep
from utils.voice import sanitize_text
DEFAULT_MAX_LENGTH: int = (
50 # Video length variable, edit this on your own risk. It should work, but it's not supported
)
class TTSEngine:
"""Calls the given TTS engine to reduce code duplication and allow multiple TTS engines.
Args:

@ -5,11 +5,13 @@ from pathlib import Path
from subprocess import Popen
from typing import NoReturn
from prawcore import ResponseException
from utils.console import print_substep
from reddit.subreddit import get_subreddit_threads
from utils import settings
from utils.cleanup import cleanup
from utils.console import print_markdown, print_step
from utils.console import print_substep
from utils.ffmpeg_install import ffmpeg_install
from utils.id import id
from utils.version import checkversion
import argparse
@ -25,7 +27,6 @@ from video_creation.background import (
from video_creation.final_video import make_final_video
from video_creation.screenshot_downloader import get_screenshots_of_reddit_posts
from video_creation.voices import save_text_to_mp3
from utils.ffmpeg_install import ffmpeg_install
__VERSION__ = "3.2.1"

@ -1,18 +1,16 @@
import re
from prawcore.exceptions import ResponseException
from utils import settings
import praw
from praw.models import MoreComments
from prawcore.exceptions import ResponseException
from utils import settings
from utils.ai_methods import sort_by_similarity
from utils.console import print_step, print_substep
from utils.posttextparser import posttextparser
from utils.subreddit import get_subreddit_undone
from utils.videos import check_done
from utils.voice import sanitize_text
from utils.posttextparser import posttextparser
from utils.ai_methods import sort_by_similarity
def get_subreddit_threads(POST_ID: str):

@ -1,6 +1,6 @@
boto3==1.26.142
botocore==1.29.142
gTTS==2.3.2
gTTS==2.5.1
moviepy==1.0.3
playwright==1.34.0
praw==7.7.0
@ -8,16 +8,16 @@ prawcore~=2.3.0
requests==2.31.0
rich==13.4.1
toml==0.10.2
translators==5.7.6
translators==5.9.1
pyttsx3==2.90
Pillow==9.5.0
Pillow==10.3.0
tomlkit==0.11.8
Flask==2.3.3
clean-text==0.6.0
unidecode==1.3.6
unidecode==1.3.8
spacy==3.5.3
torch==2.0.1
transformers==4.29.2
torch==2.3.0
transformers==4.40.2
ffmpeg-python==0.2.0
elevenlabs==0.2.17
yt-dlp==2023.7.6

@ -1,6 +1,6 @@
import numpy as np
from transformers import AutoTokenizer, AutoModel
import torch
from transformers import AutoTokenizer, AutoModel
# Mean Pooling - Take attention mask into account for correct averaging

@ -1,6 +1,6 @@
import os
from os.path import exists
import shutil
from os.path import exists
def _listdir(d): # listdir with full path

@ -1,7 +1,8 @@
import zipfile
import requests
import os
import subprocess
import zipfile
import requests
def ffmpeg_install_windows():
@ -39,7 +40,10 @@ def ffmpeg_install_windows():
# Rename and move files
os.rename(f"{ffmpeg_extracted_folder}-6.0-full_build", ffmpeg_extracted_folder)
for file in os.listdir(os.path.join(ffmpeg_extracted_folder, "bin")):
os.rename(os.path.join(ffmpeg_extracted_folder, "bin", file), os.path.join(".", file))
os.rename(
os.path.join(ffmpeg_extracted_folder, "bin", file),
os.path.join(".", file),
)
os.rmdir(os.path.join(ffmpeg_extracted_folder, "bin"))
for file in os.listdir(os.path.join(ffmpeg_extracted_folder, "doc")):
os.remove(os.path.join(ffmpeg_extracted_folder, "doc", file))
@ -101,7 +105,10 @@ def ffmpeg_install():
try:
# Try to run the FFmpeg command
subprocess.run(
["ffmpeg", "-version"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
["ffmpeg", "-version"],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except FileNotFoundError as e:
# Check if there's ffmpeg.exe in the current directory

@ -1,9 +1,10 @@
import os
import re
import textwrap
import os
from PIL import Image, ImageDraw, ImageFont
from rich.progress import track
from TTS.engine_wrapper import process_text

@ -1,6 +1,7 @@
import re
from typing import Tuple, Dict
from pathlib import Path
from typing import Tuple, Dict
import toml
from rich.console import Console

@ -2,8 +2,8 @@ import json
from os.path import exists
from utils import settings
from utils.console import print_substep
from utils.ai_methods import sort_by_similarity
from utils.console import print_substep
def get_subreddit_undone(submissions: list, subreddit, times_checked=0, similarity_scores=None):

@ -4,10 +4,10 @@ import time as pytime
from datetime import datetime
from time import sleep
from cleantext import clean
from requests import Response
from utils import settings
from cleantext import clean
if sys.version_info[0] >= 3:
from datetime import timezone

@ -5,11 +5,12 @@ from pathlib import Path
from random import randrange
from typing import Any, Tuple, Dict
import yt_dlp
from moviepy.editor import VideoFileClip, AudioFileClip
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
from utils import settings
from utils.console import print_step, print_substep
import yt_dlp
def load_background_options():

@ -1,9 +1,12 @@
import multiprocessing
import os
import re
import tempfile
import threading
import time
from os.path import exists # Needs to be imported specifically
from typing import Final
from typing import Tuple, Any, Dict
from typing import Tuple, Dict
import ffmpeg
import translators
@ -11,15 +14,11 @@ from PIL import Image
from rich.console import Console
from rich.progress import track
from utils import settings
from utils.cleanup import cleanup
from utils.console import print_step, print_substep
from utils.thumbnail import create_thumbnail
from utils.videos import save_data
from utils import settings
import tempfile
import threading
import time
console = Console()

@ -4,7 +4,6 @@ from pathlib import Path
from typing import Dict, Final
import translators
from playwright.async_api import async_playwright # pylint: disable=unused-import
from playwright.sync_api import ViewportSize, sync_playwright
from rich.progress import track
@ -12,7 +11,6 @@ from utils import settings
from utils.console import print_step, print_substep
from utils.imagenarator import imagemaker
from utils.playwright import clear_cookie_by_name
from utils.videos import save_data
__all__ = ["download_screenshots_of_reddit_posts"]

@ -5,9 +5,9 @@ from rich.console import Console
from TTS.GTTS import GTTS
from TTS.TikTok import TikTok
from TTS.aws_polly import AWSPolly
from TTS.elevenlabs import elevenlabs
from TTS.engine_wrapper import TTSEngine
from TTS.pyttsx import pyttsx
from TTS.elevenlabs import elevenlabs
from TTS.streamlabs_polly import StreamlabsPolly
from utils import settings
from utils.console import print_table, print_step

Loading…
Cancel
Save