Merge branch 'legacy' into new_frontend

This commit is contained in:
2022-09-23 22:38:30 +02:00
42 changed files with 72 additions and 500 deletions

1
backend/Procfile Normal file
View File

@ -0,0 +1 @@
web: gunicorn wsgi:app

View File

@ -18,7 +18,7 @@ def create_data_directory():
def get_catalog_url():
r = requests.get('https://www.karafun.de/karaoke-song-list.html')
soup = BeautifulSoup(r.content, 'html.parser')
url = soup.findAll('a', href=True, text='Available in CSV format')[0]['href']
url = soup.findAll('a', href=True, text='Verfügbar in CSV-Format')[0]['href']
return url
def get_songs(url):
@ -36,7 +36,9 @@ def check_config_exists():
return os.path.isfile(config_file)
def load_version(app):
if os.path.isfile(".version"):
if os.environ.get("SOURCE_VERSION"):
app.config['VERSION'] = os.environ.get("SOURCE_VERSION")[0:7]
elif os.path.isfile(".version"):
with open('.version', 'r') as file:
data = file.read().replace('\n', '')
if data:

View File

@ -1,4 +1,5 @@
requests
pandas
Flask-BasicAuth
bs4
bs4
gunicorn

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

4
backend/wsgi.py Normal file
View File

@ -0,0 +1,4 @@
from app import app
if __name__ == "__main__":
app.run()