View Single Post
Old 11-11-2008, 03:39 PM   #10
Tommy
Enthusiast
Tommy began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Oct 2006
Location: Germany
Device: Iliad, Sony 505
Hi,

another update... with further new features:
  • Drag & Drop is now supported: If one drops one (or several) file(s) on one of the lists, it(they) will be added (as if one had pressed the 'New' button). In case of several files a dialog will be shown to prompt the user whether the given file should be accepted or not.
  • Meta-data: In case of D'n'D before adding the book(s) an attempt to pull the author and the title from the file(s) is made. Files with suffixes
    • pdf,
    • html,
    • mobi or
    • lit
    are actually parsed (in some crude way) to obtain the information.
    For other files some some heuristic is applied to pull the information from the filename itself:
    • Author: it is assumed that the directory containing the given file is the author's name.
    • Title: everything left from the last '.' of the filename up to either dash or slash (or backslash for OSs of a certain manufacturer (from Redmond)) is used as title.
    • Series: the text between the two right-most dashes is taken as the series to which this book belongs to.
  • File-conversion: A 'Convert' button has been added which allows to to convert files from some formats into some others. Currently the rules are hard-wired (according to my needs):
    • txt -> pdf: this is done by means of a perl-script (txt2html.pl) I attached and that has to be located in Catalog/bin .
    • html -> tex: this is done by means of another perl-script (html2latex by Peter Thatcher) I attached as well.
    • tex -> pdf: this is done using pdflatex (this means that users of certain OSs of a particular software manufacturer are screwed unless cygwin saves their day; any other Unixish OS shouldn't have a problem)
    • rtf -> html: here, a binary (rtf2html by Chuck Shotton and Dmitry Potapov) is used. If you want to this feature and don't have a Mac you'll have to compile it first and copy this new binary to Catalog/bin.
    • lit: expands the reader file into a directory using the famous clit (by Dan A. Jackson).

Catalog itself is now shipped in a zipped tarball that contains directory 'Catalog' and the jar-file itself and there is a sub-directory with all helper-programs mentioned above.

If you want to use html2latex.pl you'll first have install perl-module as described in its README.

Even if I repeat me, if you want to use rtf2html you'll probably have to compile it first. In most cases a simple 'make' should do the job.

The same holds for clit, the executable coming with this tarball is the one for the Mac, any other OS will have to replace this by the correct OS-dependant incarnation.

And now some words on txt2html.pl: This is a hack I wrote quite some time ago. It has two major modes: text-converions into html or into latex. Catalog uses this latter option and I have things set up such that when txt2html.pl is called a PDF for the Iliad is created. In txt2html's config-file there is a reference to a latex-style file (iliad.sty) that holds the settings I want to have for my eBooks.

Should anyone want to have support for mobi-conversion, just drop me a line. In the meantime I have mobiperl installed and running, although I don't use it (latex produces the better output on the Iliad).
Or if you want to use Catalog with your device, please let me know.

I attached (hopefully) all the files needed to get things running, if not please yell.

Regards,
Tommy
Attached Files
File Type: gz Catalog.tar.gz (113.4 KB, 459 views)
File Type: gz txt2html.tar.gz (8.5 KB, 427 views)
File Type: gz rtf2html.tar.gz (5.4 KB, 411 views)
File Type: gz html2latex.tar.gz (88.4 KB, 425 views)

Last edited by Tommy; 11-11-2008 at 03:52 PM.
Tommy is offline   Reply With Quote