[Tellico-users] Exporting tellico file from command line

Louis-Philippe Véronneau tech at sogeecom.org
Tue Mar 24 12:40:31 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Here is a little bash script that I made up:

#!/bin/bash

# This program takes a Tellico database file (*.tc), extracts the XML file
# from it, applies a XSL file and exports it to HTML
#
# To run, this script needs:
#    * Tellico's source code
#    * unzip
#    * xsltproc
#    * a Tellico database

tellico_database="foo.tc"
# This is the XSL file you wish to use. I recommend "/xslt/tellico2html.xsl" and tweak it
xsl="/var/www/tellico/script/tellico-2.3.10/xslt/tellico2html.xsl"
output_file="/var/www/tellico/html/tellico.html"

# We start by extracting the XML file
cp "$tellico_database" /var/www/tellico/script/tellico.zip
unzip -q -o /var/www/tellico/script/tellico.zip tellico.xml -d /var/www/tellico/script/

# We apply the XSL and export it to HTML
xsltproc $xsl /var/www/tellico/script/tellico.xml > $output_file

# Clean things up
rm /var/www/tellico/script/tellico.zip
rm /var/www/tellico/script/tellico.xml

After that, it's just a matter of running that into a cron and having an Apache Alias put the html file and the js online. Your can see an example
of it here: http://sogeecom.org/centre-de-documentation/ (click on "une liste")

Thanks for the very nice help!

- -- 
Louis-Philippe Véronneau - Gestionnaire de réseau informatique
SOGÉÉCOM - Société Générale des Étudiantes et Étudiants du Collège de Maisonneuve
3800, rue Sherbrooke Est (local D-2610)
Montréal, Québec, Canada, H1X 2A2
Téléphone: 514-254-7131, poste 4515
Site web: sogeecom.org



On 2015-03-19 20:49, Robby Stephenson wrote:
> On 03/17/2015 08:07 AM, Louis-Philippe Véronneau wrote:
>> It does read utf-8 characters, but the problems seems to be on the ordering. Authors starting by "É" end up at the end of the list when they
>> should be classified with all the "E"s.
> 
> That can probably be tweaked with the LC_COLLATE environment variable.
> 
> Robby
> 




-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJVEVs0AAoJEHrqxOxqqgqXN/IP/0T0XtymSYFt9yxpG4PKWchN
obLf99iIz8wMSo+GkzKuh6WbP39gzZqk/UQvPSCfjS9ljahV7patn/IXkEIB8sZ1
IPHuHJBWx9b2H3UT8Vdqg66SPZMhJaXXF1tEsKGSpW4K2ypiyRtIXeLFiL2Ye3lK
sE+qoTegD/34MRjYDPWtLA/76VfSSbIEnBC7YBVab5f3S/J9VrSKUbv8vl6epy0m
vu/XK3PRVlQkYAIUC8KaEdeXPAnPXW6zScikfs6qB3p6MUhyfptCxaUdzHrCKzNs
hVHKY7jFS722yXrAeY4Wkb18ssjroBD56Tk/a+st2r/nB0WKOc+5NT2SzGgogLyr
lTnJNnqsoLmkYdZLpghxSdkQLvsHKk/2b3G6SlbDaKgm1ZfsKTDj5xe80sMt9GL9
2RV35NtNVlE3IuI3wrLvng24uNG99GOQhaKtuaNpOSZHh2OTEdgqNMCaAhvkG5MH
l4azKqxIZBkRDxIBP7yaYWPTOvniQQ8dv+gkxHQaRS6qW/US2xf7o8A7XS0WiphL
8Gq0CaNUizK6nwWAA4ZLDuo68OE0DVCejYQjDLznzaymOA57kvibQh/oh+WmIsul
lw259CRJJ3vGCVwtDOf0FrC8c5lyN/tnROqxQrRqrNrXvBODz/W5K4k9n6rEwsOP
SrvFTQRQfv29L+cRsUNS
=9Lkg
-----END PGP SIGNATURE-----


More information about the tellico-users mailing list