diff --git a/LICENSE b/LICENSE index 03aa068..6da480f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Michal +Copyright (c) 2023 Michal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 28bd94d..9d66729 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ## Features - [x] Easy uploading and managing of a gallery of images - - [x] Multi user support, helping you manage a whole group of photographers + - [x] Multi-user support, helping you manage a whole group of photographers - [x] Image groups, helping you sort your favourite memories - [x] Custom CSS support - [ ] Password locked images/image groups, helping you share photos only to those who you want to @@ -34,7 +34,7 @@ And many more planned things! ## screenshots -Homescreen +Home-screen ![screenshot](.github/images/homepage.png) Image view @@ -52,7 +52,7 @@ By default, the app runs on port 5000, 4 workers on `gunicorn` ready for you to poetry run python3 run.py -Now follow the provided prompts to fill in the information for the Admin account and you're ready to go! +Now follow the provided prompts to fill in the information for the Admin account, and you're ready to go! ### Common issues #### App failing to create a user config folder @@ -61,7 +61,7 @@ Try checking if you have `XDG_CONFIG_HOME` setup. If you don't, you can set that export XDG_CONFIG_HOME="$HOME/.config" -## Finall notes +## Finally notes Thank you to everyone who helped me test the previous and current versions of the gallery, especially critters: diff --git a/gallery/routes/api.py b/gallery/routes/api.py index f4d8b5c..2e55154 100644 --- a/gallery/routes/api.py +++ b/gallery/routes/api.py @@ -191,7 +191,7 @@ def delete_image(image_id): abort(500) logging.info('Removed image (%s) %s', image_id, img.file_name) - flash(['Image was all in Le Head!', 0]) + flash(['Image was all in Le Head!', 1]) return 'Gwa Gwa' diff --git a/run.py b/run.py index 3e55dfb..4bb52fc 100644 --- a/run.py +++ b/run.py @@ -13,7 +13,7 @@ from setup.args import PORT, ADDRESS, WORKERS, DEBUG from setup.configuration import Configuration -Configuration() # Run prechecks +Configuration() # Run pre-checks if DEBUG: diff --git a/setup/configuration.py b/setup/configuration.py index 31008e3..0dc8da5 100644 --- a/setup/configuration.py +++ b/setup/configuration.py @@ -71,9 +71,10 @@ class Configuration: print(""" #################################################### -# PLEASE NOTE DOWN THE FLASK_SECRET KEY LOCARED IN # -# YOUR .config/onlylegs/.env FILE! A NEW KEY WAS # -# GENERATED FOR YOU! # +# A NEW KEY WAS GENERATED FOR YOU! PLEASE NOTE # +# DOWN THE FLASK_SECRET KEY LOCATED IN YOUR # +# .config/onlylegs/.env FOLDER! LOOSING THIS KEY # +# WILL RESULT IN YOU BEING UNABLE TO LOG IN! # #################################################### """) @@ -86,14 +87,11 @@ class Configuration: email_regex = re.compile(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b') username_regex = re.compile(r'\b[A-Za-z0-9._%+-]+\b') - print("No config file found, please enter the following information:") - while not is_correct: - try: - username = input("Admin username: ") - name = input("Admin name: ") - email = input("Admin email: ") - except ValueError: - print("Please enter valid values!") + print("\nNo config file found, please enter the following information:") + while not is_correct: + username = input("Admin username: ") + name = input("Admin name: ") + email = input("Admin email: ") # Check if the values are valid if not username or not username_regex.match(username): @@ -130,7 +128,7 @@ class Configuration: }, 'website': { 'name': 'OnlyLegs', - 'motto': 'A gallery built for fast and simple image management. You can change this in the settings', + 'motto': 'A gallery built for fast and simple image management!', 'language': 'en', } } diff --git a/setup/runner.py b/setup/runner.py index 86b20f4..9411ca6 100644 --- a/setup/runner.py +++ b/setup/runner.py @@ -1,6 +1,7 @@ from gunicorn.app.base import Application from gunicorn import util + class OnlyLegs(Application): def __init__(self, options={}): self.usage = None