Skip to content

Instantly share code, notes, and snippets.

View fraktik's full-sized avatar

Tomáš Wünsch fraktik

  • Municipal Library Ústí nad Orlicí
  • Letohrad, Czech Republic
View GitHub Profile
@fraktik
fraktik / restart-katalog_clean_log.sh
Last active May 27, 2020 08:23
Vufind - restart (Vufind2, Apache, MySQL, cleaning /var/log, showing disk quota )
echo
echo Restarting + Cleaning of Vufind: Vufind2, Apache, MySQL, cleaning /var/log
echo
df -h | grep /dev/x
echo
echo _____________________Stopping:__________________________________________________
cd /usr/local/vufind2
@fraktik
fraktik / ereading-only.sh
Last active February 18, 2021 12:45
Ereading (palmknihy.cz) skripty pro import nových položek ze serveru do vufindu Ustí nad Orlicí
#!/bin/bash
cd data/ereading
rm nkc.mrc
echo "open aleph.nkp.cz:9991" > commands.yaz
echo "base SKC-UTF" >> commands.yaz
echo "set_marcdump nkc.mrc" >> commands.yaz
echo "Zjistuji jiz importovane knihy..."
@fraktik
fraktik / eReading log - VUFIND 2019 - SECOND attempt
Created November 7, 2019 09:41
Logy - ruční spuštění ereading (palmknihy.cz) skriptů pro import nových položek ze serveru do vufindu Ustí nad Orlicí
This file has been truncated, but you can view the full file.
root@vufind:~# /usr/local/vufind2/prepare-ereading.sh
/usr/local/vufind2/prepare-ereading.sh: line 3: cd: data: No such file or directory
rm: cannot remove ‘xml_rent.php’: No such file or directory
--2019-11-06 10:51:44-- http://www.ereading.cz/xml/xml_rent.php
Resolving www.ereading.cz (www.ereading.cz)... 185.219.171.92
Connecting to www.ereading.cz (www.ereading.cz)|185.219.171.92|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7838707 (7,5M) [text/xml]
Saving to: ‘xml_rent.php’
@fraktik
fraktik / create-instance
Created October 25, 2019 19:45
Perl skript na vytvoření nové CENTER instance (primárně) na stejném serveru s Koha - zkopíruje konfigy, provede jejich nastavením, vytvoří linky na společné soubory.
#!/bin/bash
echo "**********************************************"
echo "* Center2 instance creator *"
echo "* Do NOT use in single-instance environment! *"
echo "**********************************************"
echo
BASE_PATH=$(dirname "$(dirname "$(readlink -f "$0")")")
@fraktik
fraktik / finishTransfers.sh
Created October 11, 2019 07:09
Skript na dokončení přesunu výměnných souborů v Koha
#!/bin/bash
# include helper functions
if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then
. "/usr/share/koha/bin/koha-functions.sh"
else
echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2
exit 1
fi
@fraktik
fraktik / obalkyknih.css
Last active October 10, 2019 11:37 — forked from xmorave2/obalkyknih.css
Obálky knih intranet Koha
#cover_obalkyknih, #catalogue_detail_biblio {
float:left;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
@fraktik
fraktik / koha-conf.xml
Created September 3, 2019 11:56
ústí nad orlicí - MěK - hlavní nastavení kohy
<yazgfs>
<listen id="biblioserver" >unix:/var/run/koha/usti/bibliosocket</listen>
<listen id="authorityserver" >unix:/var/run/koha/usti/authoritysocket</listen>
<!-- Uncomment the following entry if you want to run the public Z39.50 server.
Also uncomment the <server> and <serverinfo> sections for id 'publicserver'
under PUBLICSERVER'S BIBLIOGRAPHIC RECORDS title-->
<listen id="publicserver" >tcp:@:9998</listen>
@fraktik
fraktik / IntranetUserJS - Regiony - v2019_08 ToW
Last active August 27, 2019 14:37
IntranetUserJS - Brandys - 8/2019 - ToW - edited
/* ... ____ "added Brandýs commented start" ToW: v27.8.2019 ___ ... */
/* chybí integrace UO (MěK) */
/* */
/* EDITOVAT: anonymBorrower printrcoll (TISK SESTAVY) .. t&reports=1&limit :: 1: brandys, lanskroun, kraliky, vmyto; 3: REKS, zamberk, jablonne; 5: Letohrad; 14: Chocen */
/* Statistiky návštěv a internetu - start */
/* ořezaná verze bez internetu*/
/* NEVÍM: isitItem = 32056 */
/* VYŽADUJE: anonymBorrower = 307 => založit anonymního čtenáře */
@fraktik
fraktik / SQL - report
Created August 27, 2019 09:58
ýměnný soubor - SQL Report (třeba odkazovat v IntranetUserJS) - tisk sestavy v KOHA
SELECT "<script>window.print();</script><h4><i>Knihovna:</i></h4>"AS "Prirustkove cislo", CONCAT_WS("", "<h4>", b.branchname, "</h4>") AS "Signatura","<h4><i>Soubor:</i></h4>" AS "Autor", CONCAT_WS("", "<h4>", c.colTitle, "</h4>") AS "Nazev", "" AS "Cena"
FROM collections c
JOIN branches b ON c.colBranchcode = b.branchcode
JOIN (SELECT @IdSouboru:=<<Id souboru>>) var
WHERE c.colId = @IdSouboru
UNION
SELECT "", "", "", "<h4>Naučná pro dospělé:</h4>", ""
UNION
SELECT i.stocknumber AS "Prirustkove cislo", i.itemcallnumber AS "Signatura", b.author AS "Autor", b.title AS "Nazev", i.price AS "Cena"
FROM collections c
Ano - ne - vrátit - prodloužit vše
Brandys == VMyto
1: brandys, lanskroun, kraliky, vmyto
3: REKS, zamberk, jablonne
5: Letohrad
14: Chocen
=Run+this+report&reports=1