diff --git a/babel.config.json b/babel.config.json
deleted file mode 100644
index 1320b9a327..0000000000
--- a/babel.config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["@babel/preset-env"]
-}
diff --git a/datas/metadata.py b/datas/metadata.py
index f78c8cf040..7dc744a2e7 100644
--- a/datas/metadata.py
+++ b/datas/metadata.py
@@ -4348,6 +4348,40 @@ class Speaker(SpeakerRequired, total=False):
},
},
},
+ "Dayton Audio OPAL1": {
+ "skip": True,
+ "brand": "Dayton Audio",
+ "model": "OPAL1",
+ "type": "passive",
+ "price": "800",
+ "amount": "pair",
+ "shape": "bookshelves",
+ "default_measurement": "eac",
+ "measurements": {
+ "eac": {
+ "origin": "ErinsAudioCorner",
+ "format": "klippel",
+ "reviews": {
+ "eac": "https://www.erinsaudiocorner.com/loudspeakers/dayton_opal1/",
+ "yt": "https://youtu.be/BDv222LHNM0",
+ },
+ "review_published": "202404xx",
+ "specifications": {
+ "sensitivity": 78.5,
+ "impedance": 4.3,
+ "SPL": {
+ "peak": 102,
+ },
+ "size": {
+ "height": 356,
+ "width": 178,
+ "depth": 241,
+ },
+ "weight": 9.4,
+ },
+ },
+ },
+ },
"DB Audiotechnik 8S": {
"brand": "DB Audiotechnik",
"model": "8S",
@@ -22542,6 +22576,41 @@ class Speaker(SpeakerRequired, total=False):
},
},
},
+ "Wharfedale Super Denton": {
+ "skip": True,
+ "brand": "Wharfedale",
+ "model": "Super Denton",
+ "type": "passive",
+ "price": "1400",
+ "amount": "pair",
+ "shape": "bookshelves",
+ "default_measurement": "eac",
+ "measurements": {
+ "eac": {
+ "origin": "ErinsAudioCorner",
+ "format": "klippel",
+ "reviews": {
+ "eac": "https://www.erinsaudiocorner.com/loudspeakers/wharfedale_super_denton/",
+ "yt": "https://youtu.be/5Xb9Ku0Fy_E",
+ },
+ "review_published": "202404xx",
+ "specifications": {
+ "sensitivity": 87,
+ "impedance": 3.4,
+ "SPL": {
+ "peak": 103,
+ },
+ "size": {
+ "height": 360,
+ "width": 246,
+ "depth": 295,
+ },
+ "weight": 9.2,
+ },
+ },
+ },
+ },
+
"Wilson Audio TuneTot": {
"brand": "Wilson Audio",
"model": "TuneTot",
diff --git a/datas/template.py b/datas/template.py
new file mode 100644
index 0000000000..e3f1259c30
--- /dev/null
+++ b/datas/template.py
@@ -0,0 +1,36 @@
+ "": {
+ "skip": True,
+ "brand": "",
+ "model": "",
+ "type": "passive",
+ "price": "",
+ "amount": "pair",
+ "shape": "bookshelves",
+ "default_measurement": "eac",
+ "measurements": {
+ "eac": {
+ "origin": "ASR",
+ "origin": "ErinsAudioCorner",
+ "format": "klippel",
+ "reviews": {
+ "asr": "",
+ "eac": "",
+ "yt": "",
+ },
+ "review_published": "202404xx",
+ "specifications": {
+ "sensitivity": ,
+ "impedance": ,
+ "SPL": {
+ "peak": ,
+ },
+ "size": {
+ "height": ,
+ "width": ,
+ "depth": ,
+ },
+ "weight": ,
+ },
+ },
+ },
+ },
diff --git a/generate_html.py b/generate_html.py
index 3778abbd53..d37bc34e54 100755
--- a/generate_html.py
+++ b/generate_html.py
@@ -284,7 +284,7 @@ def main():
meta = json.load(f)
# load versions for various css and js files
- versions = get_versions("./update_3rdparties.sh")
+ versions = get_versions("{}/update_3rdparties.sh".format(cpaths.CPATH_SCRIPTS))
# only build a dictionnary will all graphs
main_df = {}
@@ -316,7 +316,8 @@ def main():
# configure Mako
mako_templates = TemplateLookup(
- directories=["src/website"], module_directory="./build/mako_modules"
+ directories=[cpaths.CPATH_WEBSITE, cpaths.CPATH_BUILD_WEBSITE],
+ module_directory=cpaths.CPATH_BUILD_MAKO,
)
# write index.html
@@ -436,37 +437,25 @@ def main():
"pmc.png",
"revel.png",
"spin.svg",
- "volume-0.svg",
- "volume-1.svg",
- "volume-2.svg",
- "volume-3.svg",
- "volume-4.svg",
- "volume-5.svg",
- "volume-danger-0.svg",
- "volume-danger-1.svg",
- "volume-danger-2.svg",
- "volume-danger-3.svg",
- "volume-info-0.svg",
- "volume-info-1.svg",
- "volume-info-2.svg",
- "volume-info-3.svg",
- "volume-success-0.svg",
- "volume-success-1.svg",
- "volume-success-2.svg",
- "volume-success-3.svg",
- "volume.svg",
]:
file_in = cpaths.CPATH_DATAS_ICONS + "/" + f
- file_out = cpaths.CPATH_DOCS + "/" + f
+ file_out = cpaths.CPATH_DOCS + "/pictures/" + f
shutil.copy(file_in, file_out)
# copy custom css
for f in [
"spinorama.css",
+ ]:
+ file_in = cpaths.CPATH_WEBSITE + "/" + f
+ file_out = cpaths.CPATH_DOCS + "/css/" + f
+ shutil.copy(file_in, file_out)
+
+ # copy manifest
+ for f in [
"manifest.json",
]:
file_in = cpaths.CPATH_WEBSITE + "/" + f
- file_out = cpaths.CPATH_DOCS + "/svg" + f
+ file_out = cpaths.CPATH_DOCS + "/" + f
shutil.copy(file_in, file_out)
# cleanup flow directives: currently unused
@@ -478,7 +467,7 @@ def main():
flow_param,
cpaths.CPATH_WEBSITE,
"--out-dir",
- cpaths.CPATH_DOCS,
+ cpaths.CPATH_BUILD_WEBSITE,
)
status = subprocess.run(
[flow_command], shell=True, check=True, capture_output=True # noqa: S602
@@ -487,7 +476,7 @@ def main():
print("flow failed")
# copy css/js files
- logger.info("Copy js files to %s", cpaths.CPATH_DOCS)
+ logger.info("Copy js files to %s", cpaths.CPATH_DOCS_JS)
try:
for item in (
"compare",
@@ -498,6 +487,7 @@ def main():
"meta",
"misc",
"onload",
+ "pagination",
"plot",
"scores",
"search",
@@ -532,21 +522,26 @@ def main():
min=".min" if flag_optim else "",
versions=versions,
)
- item_filename = "{}/{}-{}.js".format(cpaths.CPATH_DOCS, item, CACHE_VERSION)
- write_if_different(item_content, item_filename, force=False)
+ item_filename = "{}/{}-1-gen.js".format(cpaths.CPATH_BUILD_WEBSITE, item)
+ write_if_different(item_content, item_filename, force=True)
# compress files with terser
if flag_optim:
- terser_command = "{0} {1}/{2} > {1}/{3}".format(
+ terser_command = "{0} {1}/{2} > {3}/{4}".format(
"./node_modules/.bin/terser",
- cpaths.CPATH_DOCS,
- "{}-{}.js".format(item, CACHE_VERSION),
+ cpaths.CPATH_BUILD_WEBSITE,
+ "{}-1-gen.js".format(item),
+ cpaths.CPATH_DOCS_JS,
"{}-{}.min.js".format(item, CACHE_VERSION),
)
- status = subprocess.run(
- [terser_command], shell=True, check=True, capture_output=True # noqa: S602
- )
- if status.returncode != 0:
- print("terser failed for item {}".format(item))
+ # print(terser_command)
+ try:
+ status = subprocess.run(
+ [terser_command], shell=True, check=True, capture_output=True # noqa: S602
+ )
+ if status.returncode != 0:
+ print("terser failed for item {}".format(item))
+ except subprocess.CalledProcessError as e:
+ print("terser failed for item {} with {}".format(item, e))
# optimise files with critical
if flag_optim:
pass
@@ -573,7 +568,7 @@ def main():
)
item_filename = cpaths.CPATH_DOCS + "/" + item_name
# ok for robots but likely doesn't work for sitemap
- write_if_different(item_content, item_filename, force=False)
+ write_if_different(item_content, item_filename, force=True)
except KeyError as key_error:
print("Generating various html files failed with {}".format(key_error))
sys.exit(1)
diff --git a/package.json b/package.json
index 02e1e445fa..15e53cf6d8 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"dependencies": {
"bulmajs": "^0.0.2",
"fnm": "^0.0.0",
+ "fuse.js": "^7.0.0",
"handlebars": "^4.7.8",
"html-validate": "^7.13.2",
"html-validator": "^5.1.18",
@@ -9,6 +10,7 @@
"node": "^21.1.0",
"npm": "^10.2.3",
"plotly": "^1.0.6",
+ "plotly.js": "^2.32.0",
"sass": "^1.58.0",
"typescript-language-server": "^3.3.2"
},
@@ -24,6 +26,6 @@
"terser": "^5.30.3",
"w3c-html-validator": "^1.7.0",
"workbox-cli": "^7.0.0",
- "workbox-window": "^7.0.0"
+ "workbox-window": "^7.1.0"
}
}
diff --git a/check_404.sh b/scripts/check_404.sh
similarity index 95%
rename from check_404.sh
rename to scripts/check_404.sh
index a5ea9532e7..5a578225c0 100755
--- a/check_404.sh
+++ b/scripts/check_404.sh
@@ -19,7 +19,7 @@
pylinkvalidate.py -P https://www.spinorama.org
-for f in docs/speakers/*/*/*/*.html; do
+for f in ./docs/speakers/*/*/*/*.html; do
name=${f#docs/}
u=${name// /%20}
pylinkvalidate.py -P "https://www.spinorama.org/$u"
diff --git a/check_html.sh b/scripts/check_html.sh
similarity index 100%
rename from check_html.sh
rename to scripts/check_html.sh
diff --git a/check_meta.py b/scripts/check_meta.py
similarity index 100%
rename from check_meta.py
rename to scripts/check_meta.py
diff --git a/check_peqs.py b/scripts/check_peqs.py
similarity index 100%
rename from check_peqs.py
rename to scripts/check_peqs.py
diff --git a/cleanup.sh b/scripts/cleanup.sh
similarity index 100%
rename from cleanup.sh
rename to scripts/cleanup.sh
diff --git a/cleanup_docs.sh b/scripts/cleanup_docs.sh
similarity index 100%
rename from cleanup_docs.sh
rename to scripts/cleanup_docs.sh
diff --git a/scripts/update_kef.py b/scripts/kef_dataimport_meta.py
similarity index 100%
rename from scripts/update_kef.py
rename to scripts/kef_dataimport_meta.py
diff --git a/scripts/kefcomplete.py b/scripts/kefdata_join.py
similarity index 100%
rename from scripts/kefcomplete.py
rename to scripts/kefdata_join.py
diff --git a/setup.sh b/scripts/setup.sh
similarity index 100%
rename from setup.sh
rename to scripts/setup.sh
diff --git a/scripts/svg2symbols.py b/scripts/svg2symbols.py
index 6096dce9a9..4e5bace04b 100755
--- a/scripts/svg2symbols.py
+++ b/scripts/svg2symbols.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!python3
from glob import glob
from os.path import basename
@@ -31,7 +31,7 @@ def process(filename, xml):
if __name__ == "__main__":
svg_paths = [
- "src/website/icons/*.svg",
+ "src/website/svg/*.svg",
]
xml_pre()
diff --git a/scripts/h_and_v.sh b/scripts/swap_h_and_v.sh
similarity index 100%
rename from scripts/h_and_v.sh
rename to scripts/swap_h_and_v.sh
diff --git a/scripts/update_3rdparties.sh b/scripts/update_3rdparties.sh
new file mode 100755
index 0000000000..ce86223bd5
--- /dev/null
+++ b/scripts/update_3rdparties.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# warning this section is read by a python script (generate_html) to grab the versions
+
+PLOTLY=2.32.0
+HANDLEBARS=4.7.8
+BULMA=1.0.0
+FUSE=7.0.0
+WORKBOX=7.0.0
+
+# end section
+
+ASSETS=./docs
+ASSETS_JS=${ASSETS}/js3rd
+ASSETS_CSS=${ASSETS}/css
+
+# BULMA
+if ! test -f "${ASSETS}/handlebars-${HANDLEBARS}.min.js"; then
+ wget -O${ASSETS_JS}/handlebars-${HANDLEBARS}.min.js https://cdn.jsdelivr.net/npm/handlebars@${HANDLEBARS}/dist/handlebars.min.js
+fi
+if ! test -f "${ASSETS}/bulma-${BULMA}.min.css"; then
+ wget -O${ASSETS_CSS}/bulma-${BULMA}.min.css https://cdn.jsdelivr.net/npm/bulma@${BULMA}/css/bulma.min.css
+fi
+
+# PLOTLY
+if ! test -f "${ASSETS}/plotly-${PLOTLY}.min.js"; then
+ wget -O${ASSETS_JS}/plotly-${PLOTLY}.min.js https://cdn.plot.ly/plotly-${PLOTLY}.min.js
+fi
+
+# FUSE.JS
+npm install fuse.js
+cp node_modules/fuse.js/dist/fuse.min.mjs ${ASSETS_JS}/fuse-${FUSE}.min.mjs
+
+# WORKBOX
+npm install workbox-window
+cp node_modules/workbox-window/build/workbox-window.prod.mjs ${ASSETS_JS}/workbox-window-${WORKBOX}.min.js
+cp node_modules/workbox-window/build/workbox-window.prod.mjs.map ${ASSETS_JS}/workbox-window-${WORKBOX}.min.js.map
+
diff --git a/scripts/update_api.sh b/scripts/update_api.sh
index 2fbddaeff0..39335f2b1b 100755
--- a/scripts/update_api.sh
+++ b/scripts/update_api.sh
@@ -1,23 +1,38 @@
#!/bin/bash
+# A library to display spinorama charts
+#
+# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see