This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Command line export and reporting

Tags: None
(comma "," separated)
andriuskurtinaitis
Registered Member
Posts
5
Karma
0

Command line export and reporting

Tue Dec 06, 2016 8:11 am
Hello,
is there a way to perform tellico data export (csv) and reporting using command line?
I'm trying to setup tellico for a little school library (~1000 books). They are concerned about data security.
My idea is to run an automated job to export tc data and send it via email or put it somewhere safe. So that it could be visible even without tellico itself.
Kind regards
Andrius
robbystephenson
KDE Developer
Posts
384
Karma
1
OS

Re: Command line export and reporting

Fri Dec 16, 2016 12:00 am
andriuskurtinaitis wrote:is there a way to perform tellico data export (csv) and reporting using command line?
I'm trying to setup tellico for a little school library (~1000 books). They are concerned about data security.
My idea is to run an automated job to export tc data and send it via email or put it somewhere safe. So that it could be visible even without tellico itself.

That could be done but there would be information loss in the process. The Tellico data file is a zip file with an XML contained within, so if the intent is to backup information, that's fairly easy. Just backup the XML file...
andriuskurtinaitis
Registered Member
Posts
5
Karma
0
I made some html export with
Code: Select all
xsltproc --param column-names "'title author publisher pub_year'"  --output /tmp/tellico.html /usr/share/kde4/apps/tellico/tellico2html.xsl /tmp/tellico.xml

That's already pretty nice. I also want to get CSV output, but I can't find the output template for CVS. How is CSV export done in tellico? How do I do it in command line?
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
andriuskurtinaitis wrote:I made some html export with
Code: Select all
xsltproc --param column-names "'title author publisher pub_year'"  --output /tmp/tellico.html /usr/share/kde4/apps/tellico/tellico2html.xsl /tmp/tellico.xml

That's already pretty nice. I also want to get CSV output, but I can't find the output template for CVS. How is CSV export done in tellico? How do I do it in command line?

Nice, you can use something a little more robust like
Code: Select all
unzip -p books.tc tellico.xml|xsltproc $(kde4-config --locate tellico/tellico2html.xsl --path data) - > /tmp/tellico.html
avoids having to export the tellico xml first (change the books.tc to whatever you have).

There's isn't a comparable one for CSV, since you'd have to make some assumptions about data loss. How are multiple values, paragraphs, and image links handled, for example. I could gin something up, basic, if you wanted.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]