Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2010, 06:26 AM   #1
sariel2413
Junior Member
sariel2413 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2010
Device: Stanza/iPhone 3G
Manually add/delete ebooks to a database

Hello all,

I'm trying to make something that will let my little server serve me ebooks. Calibre-server is terrific in that it lets me connect Stanza to it and download ebooks.
However, I want to do it standalone, without gui, without screen on Linux. That is where I'm starting to have some issues I am searching for ways to convert PDF/pub/txt/rtf ebooks to epub and have them added to the Calibre database.

How can I convert ebooks to epub using the command-line tools and how can I add them to the database?

I'm using ebook-convert to convert between pdf and epub (for now) but that fails because it tries to run a GUI:

Code:
host-shelf:/opt/calibre# /opt/calibre/ebook-convert /srv/Library/Anthony\,\ Piers/Anthony\,\ Piers\ -\ Adept\ 1\ -\ Split\ Infinity.pdf /srv/Library/Anthony\,\ Piers/Anthony\,\ Piers\ -\ Adept\ 1\ -\ Split\ Infinity.epub --no-default-epub-cover --line-height=16 --base-font-size=12 --margin-top=15 --margin-left=15 --margin-right=15 --margin-bottom=10 --remove-paragraph-spacing --use-auto-toc
1% Converting input to HTML...
InputFormatPlugin: PDF Input running
on /srv/Library/Anthony, Piers/Anthony, Piers - Adept 1 - Split Infinity.pdf
pdftohtml log:

Parsing all content...
Initial parse failed:
Parsing file 'index.html' as HTML
Forcing index.html into XHTML namespace
Generating default TOC from spine...
34% Running transforms on ebook...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Creating EPUB Output...
67% Creating EPUB Output
: cannot connect to X server localhost:10.0
To make this command, I've created a PHP script which will run through the directory structure on a regular basis (cron-job, probably) and convert the PDF files to epub. My PDF's are very regular and I therefore I can get the authors, series, series index and title of the books. Hopefully I can use this info to get the covers using the ebook-meta-command.

I have yet to find a way to add ebooks to the database, which I have placed in /srv/Library. Also, will the books be visible immediately?

Summary:
- How can I convert ebooks without having a GUI? * Solved
- Can I download covers and other meta-info using author/series/seriesindex/title?
- How can I add ebooks to the database (I prefer not to use SQL due to possible future compatability issues, but if needed, it's an option)? *Solved
- If I add ebooks to the database, will the Calibre-server automatically see the updates or will I have to restart it? * Solved

Sar

Small PS to Kovid: I LOVE your program, it ROCKS


Update: Disabled X forwarding, now conversion seems to work nicely.
Update: Can convert, can add to Calibre, Calibre-server hosts it. Last thing left is getting
the covers from the net.

Last edited by sariel2413; 03-18-2010 at 10:51 AM.
sariel2413 is offline   Reply With Quote
Old 03-18-2010, 07:18 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
You might want to look at calibre2Opds as a way of generating a catalog that can be accessed independently of Calibre running. Does not have dynamic updating of the catalog but that could be handled by setting Calibre2Opds to be run at periodic intervals.
itimpi is offline   Reply With Quote
Advert
Old 03-18-2010, 07:42 AM   #3
sariel2413
Junior Member
sariel2413 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2010
Device: Stanza/iPhone 3G
Quote:
Originally Posted by itimpi View Post
You might want to look at calibre2Opds as a way of generating a catalog that can be accessed independently of Calibre running. Does not have dynamic updating of the catalog but that could be handled by setting Calibre2Opds to be run at periodic intervals.
Does Calibre2Opds also convert files to epub?
Also, it seems calibre2opds requires some kind of GUI to install...is there a gui-less install?

Last edited by sariel2413; 03-18-2010 at 08:23 AM.
sariel2413 is offline   Reply With Quote
Old 03-18-2010, 04:45 PM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Youi still need to use Calibre as your library managerand to handle format conversions. Calibre2Opds is about creating an easily usable catalog from the information input into calibre. Calibre2Opds can be run in either GUI or command line mode..
itimpi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add and delete recipes coolnamehere Calibre 2 03-08-2010 08:00 PM
manually editing database teje Calibre 9 02-05-2010 02:11 AM
just delete books from database not from disk droople Calibre 5 01-31-2010 03:43 AM
How to manually add eBooks to Memory Stick (sans PRS-505)? lunged Sony Reader 2 05-10-2009 04:19 PM
How to delete database and start fresh? fshapps Calibre 1 02-08-2009 06:28 PM


All times are GMT -4. The time now is 08:52 AM.


MobileRead.com is a privately owned, operated and funded community.