[Tellico-users] Exporting tellico file from command line

Robby Stephenson robby at periapsis.org
Tue Mar 17 01:16:48 UTC 2015


On 03/16/2015 05:09 PM, Louis-Philippe VĂ©ronneau wrote:
> The thing is, I would really like to be able to cron a script or a program on our .tc database to do this automatically. Either XMl, HTMl or CSV
> would be fine.
>
> Does anybody know how this could be done? Tellico does not seem to have a cli interface. I would not mind using the C++ code that does this, but
> since I'm not familiar with Tellico's source code, I fear that looking myself for it would take ages...

If you just want XML, it's in the .tc file. The .tc file is just a Zip 
archive, so you can extract the top-level XML with

unzip books.tc tellico.xml

Depending on what kind of HTML you want, you can use xsltproc to convert 
the Tellico XML to HTML without opening Tellico. This command extracts 
the XML, pipes it through xsltproc and the tellico2html.xsl shipped with 
Tellico to output HTML. (ALl on one line)

unzip -p books.tc tellico.xml|xsltproc $(kde4-config --locate 
tellico/tellico2html.xsl --path data) - > tellico.html

Does that help?

Robby


More information about the tellico-users mailing list