Slight improvements

1. Ignore /temp in git
2. Use bibtexbrowser_configure instead of DEFINE in ...local.php
3. In makehtml.sh, adapt to Mac OS if it is detected
This commit is contained in:
Frederik Möllers
2025-08-01 00:56:14 +02:00
parent e259e5e131
commit c0e8d54438
3 changed files with 29 additions and 16 deletions
+2
View File
@@ -1,2 +1,4 @@
# ignore generated artifacts # ignore generated artifacts
/artifacts /artifacts
# ignore temporary directory if it remains after testing or so
/temp
+14 -14
View File
@@ -1,23 +1,23 @@
<?php <?php
define('ABBRV_TYPE','key'); bibtexbrowser_configure('ABBRV_TYPE','key');
// use tabular layout (HTML tables) // use tabular layout (HTML tables)
define('BIBTEXBROWSER_LAYOUT','table'); bibtexbrowser_configure('BIBTEXBROWSER_LAYOUT','table');
// URL to individual files // URL to individual files
define('BIBTEXBROWSER_URL',"https://publications.zrd-saar.de/"); bibtexbrowser_configure('BIBTEXBROWSER_URL',"https://publications.zrd-saar.de/");
// target for links // target for links
define('BIBTEXBROWSER_LINKS_TARGET','_blank'); bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_blank');
// use IEEE Transactions-like style, e.g. puts authors in front of title // use IEEE Transactions-like style, e.g. puts authors in front of title
define('BIBLIOGRAPHYSTYLE', 'JanosBibliographyStyle'); bibtexbrowser_configure('BIBLIOGRAPHYSTYLE', 'JanosBibliographyStyle');
//define('BIBLIOGRAPHYSECTIONS','AGSorgeBibliographySections'); //bibtexbrowser_configure('BIBLIOGRAPHYSECTIONS','AGSorgeBibliographySections');
// Allow "Firstname Lastname" as well as "Lastname, Firstname" for authors // Allow "Firstname Lastname" as well as "Lastname, Firstname" for authors
define('USE_FIRST_THEN_LAST',true); bibtexbrowser_configure('USE_FIRST_THEN_LAST',true);
// Enable all metadata generation // Enable all metadata generation
define('METADATA_COINS',true); // see https://en.wikipedia.org/wiki/COinS bibtexbrowser_configure('METADATA_COINS',true); // see https://en.wikipedia.org/wiki/COinS
define('METADATA_GS',true); // metadata google scholar bibtexbrowser_configure('METADATA_GS',true); // metadata google scholar
define('METADATA_DC',true); // see http://dublincore.org/ bibtexbrowser_configure('METADATA_DC',true); // see http://dublincore.org/
define('METADATA_OPENGRAPH',true); // see http://ogp.me/ bibtexbrowser_configure('METADATA_OPENGRAPH',true); // see http://ogp.me/
define('METADATA_EPRINTS',true); // see https://wiki.eprints.org/w/Category:EPrints_Metadata_Fields bibtexbrowser_configure('METADATA_EPRINTS',true); // see https://wiki.eprints.org/w/Category:EPrints_Metadata_Fields
// include language config // include language config
if(isset($_GET['language'])) if(isset($_GET['language']))
@@ -26,14 +26,14 @@ if(isset($_GET['language']))
} }
// Order entries by year, but reverse the order (newest on top) // Order entries by year, but reverse the order (newest on top)
define('ORDER_FUNCTION','compare_bib_entry_by_year_reverse'); bibtexbrowser_configure('ORDER_FUNCTION','compare_bib_entry_by_year_reverse');
function compare_bib_entry_by_year_reverse($a, $b) function compare_bib_entry_by_year_reverse($a, $b)
{ {
return 0 - compare_bib_entry_by_year($a, $b); return 0 - compare_bib_entry_by_year($a, $b);
} }
// A custom URL builder for the static files we create // A custom URL builder for the static files we create
define('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static'); bibtexbrowser_configure('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static');
function url_builder_static($bibentry) { function url_builder_static($bibentry) {
return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html'; return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html';
} }
+13 -2
View File
@@ -1,9 +1,20 @@
#!/bin/bash #!/bin/bash
# set some paths/binary names depending on the OS
case "$(uname -s)" in
"Darwin")
PHP="php83"
;;
# "Linux" is Linux
*)
PHP="php"
;;
esac
# URL of the Bibtex file # URL of the Bibtex file
BIBTEX_URL="https://cloud.hiz-saarland.de/public.php/dav/files/Yj8FtZsTS9TkFWG" BIBTEX_URL="https://cloud.hiz-saarland.de/public.php/dav/files/Yj8FtZsTS9TkFWG"
# command to run BibtexBrowser # command to run BibtexBrowser
BIBTEXBROWSER="php -c \"php_cli.ini\" -f \"bibtexbrowser.php\"" BIBTEXBROWSER="${PHP} -c \"php_cli.ini\" -f \"bibtexbrowser.php\""
# DELETEME # DELETEME
rm -rf "artifacts" "temp" rm -rf "artifacts" "temp"
@@ -20,7 +31,7 @@ then
fi fi
# copy static files # copy static files
cp -fur "static" "artifacts/" cp -fR "static" "artifacts/"
for WEBSITE_LANGUAGE in german for WEBSITE_LANGUAGE in german
do : do :