From e259e5e131d4a4cc4d64832a8a6d8671ce793a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20M=C3=B6llers?= Date: Wed, 30 Jul 2025 02:36:11 +0200 Subject: [PATCH] Build custom URLs to point to our static files --- bibtexbrowser.local.php | 6 ++++++ makehtml.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bibtexbrowser.local.php b/bibtexbrowser.local.php index 1b6f05d..f908cb4 100644 --- a/bibtexbrowser.local.php +++ b/bibtexbrowser.local.php @@ -31,4 +31,10 @@ function compare_bib_entry_by_year_reverse($a, $b) { return 0 - compare_bib_entry_by_year($a, $b); } + +// A custom URL builder for the static files we create +define('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static'); +function url_builder_static($bibentry) { + return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html'; +} ?> \ No newline at end of file diff --git a/makehtml.sh b/makehtml.sh index ff3aab5..0f6c6c1 100755 --- a/makehtml.sh +++ b/makehtml.sh @@ -6,7 +6,7 @@ BIBTEX_URL="https://cloud.hiz-saarland.de/public.php/dav/files/Yj8FtZsTS9TkFWG" BIBTEXBROWSER="php -c \"php_cli.ini\" -f \"bibtexbrowser.php\"" # DELETEME -rm -r "artifacts" "temp" +rm -rf "artifacts" "temp" # create output directories and download bibtex file mkdir -p "artifacts/keys" "temp" wget -O "temp/zrd.bib" "$BIBTEX_URL"