Fixed small bugs, Revamped string compiler, Removed dead gitea links, Added images
Update .gitignore, .htaccess, and 12 more files...
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -21,6 +21,10 @@ resources/NibblePoker/css/*.css
|
||||
tools/items/formula-wizard/*.js
|
||||
tools/items/formula-wizard/src/*.js
|
||||
|
||||
# ???
|
||||
# Source: https://github.com/sjmulder/nbt-js
|
||||
tools/items/mc-art-viewer/nbt.js
|
||||
|
||||
# Others
|
||||
*.pdn
|
||||
*.min.json
|
||||
@@ -30,6 +34,7 @@ tools/items/formula-wizard/src/*.js
|
||||
*.exe
|
||||
*.url
|
||||
*.env
|
||||
*.sqlite
|
||||
|
||||
# Temporary
|
||||
articles/*.txt
|
||||
|
6
articles/.htaccess
Normal file
6
articles/.htaccess
Normal file
@@ -0,0 +1,6 @@
|
||||
# Serving minified pages and/or pre-rendered ones first if available.
|
||||
DirectoryIndex index.min.html index.min.php index.php index.html
|
||||
|
||||
# Redirecting any URL that starts with "/content" to the root of this folder.
|
||||
RewriteEngine On
|
||||
RewriteRule ^(.*) index.php [NC]
|
@@ -55,7 +55,7 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
||||
<div class="ml-m">
|
||||
<?php
|
||||
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"), "fad fa-download", "");
|
||||
printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
|
||||
//printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
|
||||
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
|
||||
?>
|
||||
</div>
|
||||
|
@@ -1,47 +0,0 @@
|
||||
#!/bin/python
|
||||
|
||||
from datetime import datetime
|
||||
import json
|
||||
import os
|
||||
|
||||
print("Compiling lang files...")
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
|
||||
lang_data = dict()
|
||||
lang_data["_compile_date"] = datetime.utcnow().isoformat() + "Z"
|
||||
|
||||
|
||||
for main_dir_entry in os.listdir("./"):
|
||||
if main_dir_entry.startswith("_"):
|
||||
continue
|
||||
|
||||
print("> Processing ./{}".format(main_dir_entry))
|
||||
|
||||
if not os.path.isdir(os.path.join("./", main_dir_entry)):
|
||||
continue
|
||||
|
||||
lang_data[main_dir_entry] = dict()
|
||||
|
||||
for sub_dir_entry in os.listdir(os.path.join("./", main_dir_entry)):
|
||||
print("Checking ./{}/{}".format(main_dir_entry, sub_dir_entry))
|
||||
if not sub_dir_entry.endswith(".json"):
|
||||
continue
|
||||
|
||||
with open(os.path.join("./", main_dir_entry, sub_dir_entry), "rb") as f:
|
||||
input_lang_data: dict = json.loads(f.read().decode("utf-8"))
|
||||
|
||||
for lang_record_key in input_lang_data.keys():
|
||||
lang_record_key: str
|
||||
if lang_record_key.startswith("_"):
|
||||
continue
|
||||
|
||||
lang_data[main_dir_entry][lang_record_key] = input_lang_data[lang_record_key]
|
||||
|
||||
try:
|
||||
os.remove("../strings.json")
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
with open("../strings.json", "wb") as f:
|
||||
f.write(json.dumps(lang_data, separators=(',', ':')).encode("utf-8"))
|
@@ -17,7 +17,8 @@ echo ----------------------
|
||||
|
||||
:lang-compile
|
||||
echo Compiling lang files...
|
||||
python commons/strings/compile.py
|
||||
python compile_strings.py ./commons/strings/ ./commons/strings.json
|
||||
python compile_strings.py ./wiki/strings/ ./wiki/strings.json
|
||||
|
||||
:lang-end
|
||||
|
||||
@@ -34,6 +35,11 @@ cd %~dp0\resources\NibblePoker\scss\
|
||||
call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.css -q
|
||||
call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.min.css -q --style compressed
|
||||
popd
|
||||
pushd %CD%
|
||||
cd %~dp0\wiki\scss\
|
||||
call "%~dp0node_modules\.bin\sass" nibblepoker-wiki.scss:../css/nibblepoker-wiki.css -q
|
||||
call "%~dp0node_modules\.bin\sass" nibblepoker-wiki.scss:../css/nibblepoker-wiki.min.css -q --style compressed
|
||||
popd
|
||||
|
||||
:sass-end
|
||||
|
||||
|
84
compile_strings.py
Normal file
84
compile_strings.py
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/bin/python
|
||||
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Including nicer-looking print function if possible.
|
||||
try:
|
||||
from rich import print
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Preparing and parsing launch arguments
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("input", help="Input folder where the strings are located.")
|
||||
parser.add_argument("output", help="Output file where the compiled strings will be saved.")
|
||||
|
||||
|
||||
# Fixing some issues with "argparse"
|
||||
def argparse_error(message):
|
||||
raise argparse.ArgumentError(None, message)
|
||||
|
||||
|
||||
# Parsing launch options
|
||||
parser.error = argparse_error
|
||||
try:
|
||||
args = parser.parse_args()
|
||||
except argparse.ArgumentError as err:
|
||||
print(f"\033[31m\033[1mError:\033[0m\033[31m {err.message.capitalize()}\033[39m")
|
||||
print("\033[36m\033[1mUsage:\033[0m\033[36m compile_strings.py <input_folder> <output_file>\033[39m")
|
||||
sys.exit(1)
|
||||
|
||||
# Checking the given options are valid
|
||||
if not (os.path.exists(args.input) and os.path.isdir(args.input)):
|
||||
print(f"\033[31m\033[1mError:\033[0m\033[31m The given input directory '{args.input}' doesn't exist or is a file !\033[39m")
|
||||
sys.exit(2)
|
||||
|
||||
if os.path.isdir(args.output):
|
||||
print(f"\033[31m\033[1mError:\033[0m\033[31m The given output '{args.output}' is a directory !\033[39m")
|
||||
sys.exit(3)
|
||||
|
||||
# Starting the process
|
||||
print(f"Compiling '{args.input}' to '{args.output}'...")
|
||||
input_folder = os.path.abspath(args.input)
|
||||
output_file = os.path.abspath(args.output)
|
||||
|
||||
lang_data = dict()
|
||||
lang_data["_compile_date"] = datetime.utcnow().isoformat() + "Z"
|
||||
|
||||
for main_dir_entry in os.listdir(input_folder):
|
||||
if main_dir_entry.startswith("_"):
|
||||
continue
|
||||
|
||||
print("> Processing '{}'".format(main_dir_entry))
|
||||
|
||||
if not os.path.isdir(os.path.join(input_folder, main_dir_entry)):
|
||||
continue
|
||||
|
||||
lang_data[main_dir_entry] = dict()
|
||||
|
||||
for sub_dir_entry in os.listdir(os.path.join(input_folder, main_dir_entry)):
|
||||
print("-> Checking '{}/{}'".format(main_dir_entry, sub_dir_entry))
|
||||
if not sub_dir_entry.endswith(".json"):
|
||||
continue
|
||||
|
||||
with open(os.path.join(input_folder, main_dir_entry, sub_dir_entry), "rb") as f:
|
||||
input_lang_data: dict = json.loads(f.read().decode("utf-8"))
|
||||
|
||||
for lang_record_key in input_lang_data.keys():
|
||||
lang_record_key: str
|
||||
if lang_record_key.startswith("_"):
|
||||
continue
|
||||
|
||||
lang_data[main_dir_entry][lang_record_key] = input_lang_data[lang_record_key]
|
||||
|
||||
try:
|
||||
os.remove(output_file)
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
with open(output_file, "wb") as f:
|
||||
f.write(json.dumps(lang_data, separators=(',', ':')).encode("utf-8"))
|
@@ -58,7 +58,7 @@ if($contentManager->hasError) {
|
||||
$content->get_head_title() .
|
||||
localize("content.item.head.title.suffix");
|
||||
$content_head_description = $content->get_head_description();
|
||||
$content_head_title =
|
||||
$content_head_og_title =
|
||||
localize("content.item.og.title.prefix") .
|
||||
$content->get_head_title() .
|
||||
localize("content.item.og.title.suffix");
|
||||
|
@@ -123,45 +123,27 @@
|
||||
"type": "paragraph",
|
||||
"indent": 2,
|
||||
"parts": [
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://www.nuget.org/packages/NibblePoker.Library.Arguments",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.nuget"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://www.nuget.org/packages/NibblePoker.Library.Arguments)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://github.com/aziascreations/DotNet-Arguments",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.github"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://github.com/aziascreations/DotNet-Arguments)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.commons.github"}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://git.nibblepoker.lu/aziascreations/DotNet-Arguments",
|
||||
"type": "raw", "link": "https://aziascreations.github.io/DotNet-Arguments/",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.gitea"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{"type": "raw", "content": "content.commons.doc.online"}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://git.nibblepoker.lu/aziascreations/DotNet-Arguments)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
"type": "raw", "link": "https://www.nuget.org/packages/NibblePoker.Library.Arguments",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.nuget"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -12,7 +12,8 @@
|
||||
"usage.title": "Usage",
|
||||
"usage.p1": "To use this tool you can either visit \"<a href=\"https://aziascreations.github.io/Excel-Worksheet-Password-Remover\">aziascreations.github.io/Excel-Worksheet-Password-Remover</a>\" or download the repository and host the web page yourself.",
|
||||
"demo.title": "Demonstration video",
|
||||
"links.title": "Links"
|
||||
"links.title": "Links",
|
||||
"content.link.demo": "Demo hosted on GitHub"
|
||||
},
|
||||
"fr": {
|
||||
"_meta.title": "",
|
||||
@@ -26,7 +27,8 @@
|
||||
"usage.title": "Utilisation",
|
||||
"usage.p1": "Vous pouvez utiliser cet outil en allant sur \"<a href=\"https://aziascreations.github.io/Excel-Worksheet-Password-Remover\">aziascreations.github.io/Excel-Worksheet-Password-Remover</a>\" ou en téléchargeant le dépôt et en hébergeant la page web vous-même.",
|
||||
"demo.title": "Vidéo de démonstration",
|
||||
"links.title": "Liens"
|
||||
"links.title": "Liens",
|
||||
"content.link.demo": "Démo hébergée sur GitHub"
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
@@ -85,28 +87,16 @@
|
||||
"type": "raw", "link": "https://github.com/aziascreations/Excel-Worksheet-Password-Remover",
|
||||
"sr_title": "Test 123",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.github"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"t-size-8\">(https://github.com/aziascreations/Excel-Worksheet-Password-Remover)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.commons.github"}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://git.nibblepoker.lu/aziascreations/Excel-Worksheet-Password-Remover",
|
||||
"type": "raw", "link": "https://aziascreations.github.io/Excel-Worksheet-Password-Remover",
|
||||
"sr_title": "Test 123",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.gitea"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"t-size-8\">(https://git.nibblepoker.lu/aziascreations/Excel-Worksheet-Password-Remover)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.link.demo"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -447,27 +447,7 @@
|
||||
{
|
||||
"type": "raw", "link": "https://github.com/aziascreations/DotNet-ListComPort",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.github"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://github.com/aziascreations/DotNet-ListComPort)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://git.nibblepoker.lu/aziascreations/DotNet-ListComPort",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.gitea"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://git.nibblepoker.lu/aziascreations/DotNet-ListComPort)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.commons.github"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -386,27 +386,7 @@
|
||||
{
|
||||
"type": "raw", "link": "https://github.com/aziascreations/PB-ListComPort",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.github"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://github.com/aziascreations/PB-ListComPort)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://git.nibblepoker.lu/aziascreations/PB-ListComPort",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.gitea"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://git.nibblepoker.lu/aziascreations/PB-ListComPort)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.commons.github"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -149,63 +149,23 @@
|
||||
"type": "raw",
|
||||
"link": "https://github.com/aziascreations/MC-Expanded-Iron-Bundles",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.github"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://github.com/aziascreations/MC-Expanded-Iron-Bundles)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "content.commons.github"}
|
||||
]
|
||||
},
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"link": "https://git.nibblepoker.lu/aziascreations/MC-Expanded-Iron-Bundles",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "content.commons.gitea"},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://git.nibblepoker.lu/aziascreations/MC-Expanded-Iron-Bundles)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"indent": 2,
|
||||
"modifiers": ["no-top-padding"],
|
||||
"parts": [
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://modrinth.com/mod/expanded-iron-bundles",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "Modrinth [Fabric & Forge]", "localize": false},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://modrinth.com/mod/expanded-iron-bundles)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "Modrinth [Fabric & Forge]", "localize": false}
|
||||
]
|
||||
},
|
||||
|
||||
{"type": "raw", "content": "<br>", "localize": false},
|
||||
{"type": "raw", "content": "● ", "localize": false},
|
||||
{
|
||||
"type": "raw", "link": "https://www.curseforge.com/minecraft/mc-mods/expanded-iron-bundles-fabric",
|
||||
"parts": [
|
||||
{"type": "raw", "content": "CurseForge [Fabric]", "localize": false},
|
||||
{"type": "raw", "content": "<span class=\"hidden-xs-and-down\"> - ", "localize": false},
|
||||
{
|
||||
"type": "raw",
|
||||
"content": "<span class=\"font-size-12\">(https://www.curseforge.com/minecraft/mc-mods/expanded-iron-bundles-fabric)</span></span>",
|
||||
"localize": false
|
||||
}
|
||||
{"type": "raw", "content": "CurseForge [Fabric]", "localize": false}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -62,13 +62,6 @@ include 'commons/DOM/sidebar.php';
|
||||
|
||||
<?php printMainHeader(localize("links.misc.title")); ?>
|
||||
|
||||
<p class="mt-s ml-s t-w-600 t-size-12">
|
||||
<i class="fad fa-code-branch ml-xxs mr-xs"></i><a href="https://git.nibblepoker.lu/"><?php print(localize("links.gitea.title")); ?></a>
|
||||
</p>
|
||||
<p class="mt-xxs ml-l">
|
||||
<?php print(localize("links.gitea.text.1")); ?>
|
||||
</p>
|
||||
|
||||
<p class="mt-s ml-s t-w-600 t-size-12">
|
||||
<i class="fad fa-download mr-xs"></i><a href="https://files.nibblepoker.lu/"><?php print(localize("links.files.title")); ?></a>
|
||||
</p>
|
||||
|
BIN
resources/NibblePoker/images/content/dotnet-arguments/main.png
Normal file
BIN
resources/NibblePoker/images/content/dotnet-arguments/main.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Reference in New Issue
Block a user