Cleaned-up dependencies, Cleaned-up project and tool indexes
Update app.py, readme.md, and 4 more files...
This commit is contained in:
29
app.py
29
app.py
@@ -47,11 +47,11 @@ mimetypes.add_type('application/javascript', '.mjs')
|
|||||||
if os.environ.get('NP_HTML_POST_PROCESS', "NONE") == "MINIFY":
|
if os.environ.get('NP_HTML_POST_PROCESS', "NONE") == "MINIFY":
|
||||||
print("Using 'Flask-Minify' as HTML minifying post-processor")
|
print("Using 'Flask-Minify' as HTML minifying post-processor")
|
||||||
|
|
||||||
from flask_minify import Minify
|
#from flask_minify import Minify
|
||||||
Minify(app=app, html=True, js=True, cssless=True)
|
#Minify(app=app, html=True, js=True, cssless=True)
|
||||||
|
|
||||||
def post_process_html(html_content: str) -> str:
|
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.
|
# This fucking library breaks so much shit it's unbelievable.
|
||||||
# And it takes FOREVER to compile because "MuH rUsT iS sUpErIoR"...
|
# And it takes FOREVER to compile because "MuH rUsT iS sUpErIoR"...
|
||||||
@@ -395,13 +395,16 @@ if __name__ == '__main__':
|
|||||||
reload_contributors_data(os.path.join(os.getcwd(), "data/contributors.yml"))
|
reload_contributors_data(os.path.join(os.getcwd(), "data/contributors.yml"))
|
||||||
reload_sitemap_entries(os.path.join(os.getcwd(), "data/sitemap.yml"))
|
reload_sitemap_entries(os.path.join(os.getcwd(), "data/sitemap.yml"))
|
||||||
|
|
||||||
#from waitress import serve
|
if os.environ.get('NP_FLASK_WAITRESS', "0") == "1":
|
||||||
#serve(app, host='0.0.0.0', port=5000, threads=64)
|
print("Serving app using waitress.")
|
||||||
|
from waitress import serve
|
||||||
app.run(
|
serve(app, host='0.0.0.0', port=5000, threads=64)
|
||||||
host="0.0.0.0",
|
else:
|
||||||
port=5000,
|
print("Serving app using default development server.")
|
||||||
debug=True,
|
app.run(
|
||||||
# debug=False,
|
host="0.0.0.0",
|
||||||
load_dotenv=False
|
port=5000,
|
||||||
)
|
debug=True,
|
||||||
|
# debug=False,
|
||||||
|
load_dotenv=False
|
||||||
|
)
|
||||||
|
3
readme.md
Normal file
3
readme.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Website - NibblePoker.lu
|
||||||
|
Public repository containing the source code for the *nibblepoker.lu* & *nibblepoker.com* websites.
|
||||||
|
|
@@ -1,14 +1,14 @@
|
|||||||
Flask~=3.0.3
|
Flask~=3.1.0
|
||||||
Jinja2
|
Jinja2
|
||||||
MarkupSafe
|
MarkupSafe
|
||||||
#minify-html
|
|
||||||
Flask-Minify
|
Flask-Minify
|
||||||
PyYAML~=6.0.2
|
PyYAML~=6.0.2
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
|
|
||||||
|
# May be removed
|
||||||
locked-dict
|
locked-dict
|
||||||
|
|
||||||
Werkzeug~=3.0.4
|
Werkzeug~=3.1.3
|
||||||
|
|
||||||
#gunicorn
|
#gunicorn
|
||||||
waitress~=3.0.2
|
waitress~=3.0.2
|
||||||
|
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
{% block content_filters %}{% endblock %}
|
{% block content_filters %}{% endblock %}
|
||||||
<hr class="subtle">
|
<!--<hr class="subtle">-->
|
||||||
{% block content_listing %}{% endblock %}
|
{% block content_listing %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -15,7 +15,11 @@
|
|||||||
{% block content_listing %}
|
{% block content_listing %}
|
||||||
|
|
||||||
{% for project_id, project_data in get_projects().items() %}
|
{% 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">
|
<a href="{{ l10n_url_abs('/content/' + project_id, raw_lang) }}" class="a-hidden">
|
||||||
<div class="content-search-entry">
|
<div class="content-search-entry">
|
||||||
<img class="content-search-image mr-s r-l"
|
<img class="content-search-image mr-s r-l"
|
||||||
|
@@ -15,7 +15,10 @@
|
|||||||
{% block content_listing %}
|
{% block content_listing %}
|
||||||
|
|
||||||
{% for tool_id, tool_data in get_tools().items() %}
|
{% 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">
|
<a href="{{ l10n_url_abs('/tools/' + tool_id, raw_lang) }}" class="a-hidden">
|
||||||
<div class="content-search-entry">
|
<div class="content-search-entry">
|
||||||
<img class="content-search-image mr-s r-l"
|
<img class="content-search-image mr-s r-l"
|
||||||
|
Reference in New Issue
Block a user