|
|
|
@ -5,7 +5,6 @@ import markdown
|
|
|
|
|
from prefix import PrefixMiddleware
|
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
|
from time import strftime, localtime
|
|
|
|
|
import random
|
|
|
|
|
import glob
|
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
@ -15,6 +14,7 @@ load_dotenv()
|
|
|
|
|
prefix = os.environ.get('URL_PREFIX', '')
|
|
|
|
|
port = os.environ.get('PORT', 3000)
|
|
|
|
|
debug = os.environ.get('DEBUG', False)
|
|
|
|
|
update_script = os.environ.get('UPDATE', 'update.sh' )
|
|
|
|
|
|
|
|
|
|
# ---
|
|
|
|
|
# Functions
|
|
|
|
@ -47,7 +47,7 @@ def txt_list():
|
|
|
|
|
return writings
|
|
|
|
|
|
|
|
|
|
def render_list():
|
|
|
|
|
subprocess.run(['sh', '/var/www/souptxt/update.sh'], shell=True)
|
|
|
|
|
subprocess.run(['sh', update_script], shell=True)
|
|
|
|
|
with open('list.html', 'w+') as f:
|
|
|
|
|
f.write(render_template('home.html', writings=txt_list()))
|
|
|
|
|
|
|
|
|
|