1 parent
ec4729bd06
commit
2b1f7183d4
4 files changed
+9
-9
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ THEME="LIGHT"
|
||||
# set to an int e.g. 1 or 29 and leave blank for once
|
||||
TIMES_TO_RUN=""
|
||||
MAX_COMMENT_LENGTH="500"
|
||||
# Range is 0 -> 1 recommended around 0.8-1
|
||||
# Range is 0 -> 1 recommended around 0.8-0.9
|
||||
OPACITY=""
|
||||
|
||||
# see TTSwrapper.py for all valid options
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from os import system, getenv, name
|
||||
from reddit.subreddit import get_subreddit_threads
|
||||
from utils.cleanup import cleanup
|
||||
from utils.console import print_markdown, print_step
|
||||
@@ -36,16 +34,17 @@ def main():
|
||||
|
||||
def run_many(times):
|
||||
for x in range(times):
|
||||
x = x + 1
|
||||
print_step(
|
||||
f'on the {x}{("st" if x == 1 else ("nd" if x == 2 else ("rd" if x == 3 else "th")))} iteration') # correct 1st 2nd 3rd 4th 5th....
|
||||
os.system('cls' if os.name == 'nt' else 'clear') # clear terminal
|
||||
f'on the {x}{("st" if x == 1 else ("nd" if x == 2 else ("rd" if x == 3 else "th")))} iteration of {times}') # correct 1st 2nd 3rd 4th 5th....
|
||||
main()
|
||||
system('cls' if name == 'nt' else 'clear') # clear terminal
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
if os.getenv('TIMES_TO_RUN'):
|
||||
run_many(int(os.getenv('TIMES_TO_RUN')))
|
||||
if getenv('TIMES_TO_RUN'):
|
||||
run_many(int(getenv('TIMES_TO_RUN')))
|
||||
else:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ def get_subreddit_threads():
|
||||
passkey = getenv("REDDIT_PASSWORD")
|
||||
reddit = praw.Reddit(client_id=getenv("REDDIT_CLIENT_ID"), client_secret=getenv("REDDIT_CLIENT_SECRET"),
|
||||
user_agent="Accessing Reddit threads", username=getenv("REDDIT_USERNAME"),
|
||||
passkey=passkey, )
|
||||
passkey=passkey, check_for_async=False,)
|
||||
"""
|
||||
Ask user for subreddit input
|
||||
"""
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
videos.json
|
||||
#todo add videos on github
|
||||
Reference in new issue
Block a user