Cleaned-up dependencies, Cleaned-up project and tool indexes

Update app.py, readme.md, and 4 more files...
This commit is contained in:
2025-03-05 23:47:30 +01:00
parent e9a2fb97f8
commit 2c5737b518
6 changed files with 32 additions and 19 deletions

15
app.py
View File

@@ -47,11 +47,11 @@ mimetypes.add_type('application/javascript', '.mjs')
if os.environ.get('NP_HTML_POST_PROCESS', "NONE") == "MINIFY":
print("Using 'Flask-Minify' as HTML minifying post-processor")
from flask_minify import Minify
Minify(app=app, html=True, js=True, cssless=True)
#from flask_minify import Minify
#Minify(app=app, html=True, js=True, cssless=True)
def post_process_html(html_content: str) -> str:
return re.sub(r'\s+', ' ', html_content.replace('\n', ''))
return re.sub(r'\s+', ' ', html_content.replace('\n', ' '))
# This fucking library breaks so much shit it's unbelievable.
# And it takes FOREVER to compile because "MuH rUsT iS sUpErIoR"...
@@ -395,9 +395,12 @@ if __name__ == '__main__':
reload_contributors_data(os.path.join(os.getcwd(), "data/contributors.yml"))
reload_sitemap_entries(os.path.join(os.getcwd(), "data/sitemap.yml"))
#from waitress import serve
#serve(app, host='0.0.0.0', port=5000, threads=64)
if os.environ.get('NP_FLASK_WAITRESS', "0") == "1":
print("Serving app using waitress.")
from waitress import serve
serve(app, host='0.0.0.0', port=5000, threads=64)
else:
print("Serving app using default development server.")
app.run(
host="0.0.0.0",
port=5000,

3
readme.md Normal file
View File

@@ -0,0 +1,3 @@
# Website - NibblePoker.lu
Public repository containing the source code for the *nibblepoker.lu* & *nibblepoker.com* websites.

View File

@@ -1,14 +1,14 @@
Flask~=3.0.3
Flask~=3.1.0
Jinja2
MarkupSafe
#minify-html
Flask-Minify
PyYAML~=6.0.2
beautifulsoup4
# May be removed
locked-dict
Werkzeug~=3.0.4
Werkzeug~=3.1.3
#gunicorn
waitress~=3.0.2

View File

@@ -2,6 +2,6 @@
{% block main_content %}
{% block content_filters %}{% endblock %}
<hr class="subtle">
<!--<hr class="subtle">-->
{% block content_listing %}{% endblock %}
{% endblock %}

View File

@@ -15,7 +15,11 @@
{% block content_listing %}
{% for project_id, project_data in get_projects().items() %}
<div class="p-s border r-m">
<hr class="subtle">
<!--<div class="p-s border r-m">-->
<div class="p-xs r-m">
<a href="{{ l10n_url_abs('/content/' + project_id, raw_lang) }}" class="a-hidden">
<div class="content-search-entry">
<img class="content-search-image mr-s r-l"

View File

@@ -15,7 +15,10 @@
{% block content_listing %}
{% for tool_id, tool_data in get_tools().items() %}
<div class="p-s border r-m">
<hr class="subtle">
<!--<div class="p-s border r-m">-->
<div class="p-xs r-m">
<a href="{{ l10n_url_abs('/tools/' + tool_id, raw_lang) }}" class="a-hidden">
<div class="content-search-entry">
<img class="content-search-image mr-s r-l"