Internal Screaming

This commit is contained in:
Michał 2023-03-12 18:53:57 +00:00
parent 896fdb8e8a
commit 9cfb8befd2
6 changed files with 18 additions and 19 deletions

View file

@ -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

View file

@ -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:

View file

@ -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'

2
run.py
View file

@ -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:

View file

@ -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',
}
}

View file

@ -1,6 +1,7 @@
from gunicorn.app.base import Application
from gunicorn import util
class OnlyLegs(Application):
def __init__(self, options={}):
self.usage = None