Page 1 of 1

Calibre as Assets Manager for written projects

Posted: Fri 08 Feb 2019, 23:30
by clerk_gabel
For a written (school/work/book?) project I have in a folder stored several files in different format (pdf, docx, doc, djvu, jpg, png, rtf etc.).
I want to use Calibre as organizer for these files, where I find the latest release (calibre-339.1-i686.txz) to work on Slacko Puppy 6.3.2 (with extras as gtk+3-3.4.4 and python 2.7.5 already installed).

My download and install of Calibre was done by running a python command line found elsewhere in the forum. By installing in this way Puppy lost the opportunity to check for dependencies, so it is wise to manually download the txz and install via ROX for registering Calibre in the package manager.

Calibre's internal viewer is slow and imperfect when loading documents, and there seem to exist a bug in Puppy/Calibre when invoking external viewers (Textmaker2018, Evince etc.) from within Calibre even if MIME types are set appropriate.
A workaround is to install and configuring a Calibre add-on named "Open with".

Images are not supported by Calibre but can be imported after conversion to pdf using ImageMagicks convert utility.This utility can be extracted from imagemagick-6.8.6_10.i486-3_slack14.1.txz as binary together with the necessary libraries libMagickCore-6.Q16.so.1.0.0 and libMagickWand-6.Q16.so.1.0.0.To install put the binary into /usr/bin and libs into /usr/lib and execute "ldconfig -n -v /usr/lib" from a terminal window.

The script below will batch copy and convert images to pdf without significant loss of quality. Save the script as a text file without extension (eg. "converting") and set permissions for the script to executable (in ROX by right clicking in ROX (a+x (Make executable/searchable)). If executed from within the project folder pdf copies are generated and the project ready for import into Calibre.

Code: Select all

for f in *.png;
do
  convert ./"$f" ./"${f%.jpg}.pdf"

done

for f in *.jpg;
do
  convert ./"$f" ./"${f%.jpg}.pdf"

done

for f in *.tif;
do
  convert ./"$f" ./"${f%.jpg}.pdf"

done

for f in *.tga;
do
  convert ./"$f" ./"${f%.jpg}.pdf"

done