Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2016, 01:42 PM   #1
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Is there any way to export a copy of built in folder structure with just covers?

Right now I've been copying the entire database folders to a new location and then deleting all the ebooks, and OPF files.

Is there any way to do this quicker?
My goal is to get a set of folders EXACTLY like the calibre structure,
Author/Title (id)/<files>
(but where <files> is just cover.jpg)

My reason for this is I plan on making a script that reads the database and shows various information, including the covers (and it will be publicly accessible, but I do not want to also include the ebooks themselves).

Since the books table in the DB has a path field, I was intending to utilize that to show the covers, but it means I need to maintain the folder structure.
Trel is offline   Reply With Quote
Old 12-05-2016, 03:31 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Have you thought about just publishing a 'Catalog'?
Right click the Conversion Icon: <the bottom item>: EPUB, AZW3 or Mobi formats include covers and metadata
theducks is online now   Reply With Quote
Advert
Old 12-05-2016, 03:31 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Trel View Post
Right now I've been copying the entire database folders to a new location and then deleting all the ebooks, and OPF files.

Is there any way to do this quicker?
This is a file system issue not a calibre issue as such. So, try a browser search for "copy directory tree with selected files in <operating system you use>".

Backup utilities that copy (synchronise) directory trees usually provide inclusion/exclusion by file type. One of these would allow you to maintain a selective mirror, some even work in real time.

BR

Last edited by BetterRed; 12-05-2016 at 08:09 PM.
BetterRed is online now   Reply With Quote
Old 12-06-2016, 01:20 PM   #4
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Here's a really hacked together thing of what I'm doing

http://crysic.com/cadb/
and
http://crysic.com/cadb/?alt (text list without covers)
The reason I was asking this is I do not want to make any books available, just a list of what I have.

(Similar to those old 'winamp generated playlist' sites that used to pop up all the time)

Last edited by Trel; 12-06-2016 at 01:34 PM.
Trel is offline   Reply With Quote
Old 12-06-2016, 07:06 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Do you want the actual folder structure replicated on disk so you can see it in a file manager or do you want a representation of it

Those images you posted look like the latter to me. In which case do as theducks suggested. use the Create Catalogue tool. If its not in the toolbar you can add it via Preferences->Toolbars.

See ==>> Creating AZW3 • EPUB • MOBI Catalogs — calibre User Manual

BR

Last edited by BetterRed; 12-06-2016 at 07:09 PM.
BetterRed is online now   Reply With Quote
Advert
Old 12-07-2016, 08:11 AM   #6
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
On windows, I'd use robocopy (since I have a script for backups and I'm used to it)

From a command prompt, this will copy my caliber folders' covers to my L: drive

robocopy "c:\users\<userid>\calibre" "l:\calibre covers" cover.jpg /s /mir
phossler is offline   Reply With Quote
Old 12-07-2016, 10:40 AM   #7
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Quote:
Originally Posted by BetterRed View Post
Do you want the actual folder structure replicated on disk so you can see it in a file manager or do you want a representation of it

Those images you posted look like the latter to me. In which case do as theducks suggested. use the Create Catalogue tool. If its not in the toolbar you can add it via Preferences->Toolbars.

See ==>> Creating AZW3 • EPUB • MOBI Catalogs — calibre User Manual

BR
That's exactly what I'm NOT trying to do.
I'm making a PHP script to read from the database file.

There will be exactly zero actual ebooks involved.
What I want is the covers as files named 'cover.jpg' in the exact path listed in the "path" field in the "books" table of metadata.db (but in another location, such as a webserver)

My end goal is a public, live, sortable and searchable GUI for my collection of books, but not including any of the actual book files.

The suggestions with robocopy for Windows or rsync for Linux are the ones doing what I would like.

Last edited by Trel; 12-07-2016 at 11:56 AM.
Trel is offline   Reply With Quote
Old 12-07-2016, 02:07 PM   #8
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,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
If I understand what you are trying to achieve then you could try using Calibre2opds to generate the this One of the options in Calibre2opds is to NOT include download links to any eBook files, and another is to include cover images together with the generated catalog web pages (rather than referring back to the images in the Calibre library).

How closely the results will match your needs I am not sure but it could be worth checking out.
itimpi is offline   Reply With Quote
Old 12-07-2016, 03:24 PM   #9
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Quote:
Originally Posted by itimpi View Post
If I understand what you are trying to achieve then you could try using Calibre2opds to generate the this One of the options in Calibre2opds is to NOT include download links to any eBook files, and another is to include cover images together with the generated catalog web pages (rather than referring back to the images in the Calibre library).

How closely the results will match your needs I am not sure but it could be worth checking out.
Again, the PHP script I want is pulling the path information from the database file itself.

In order to use that to any effect, I need to actually ensure that path works. Exporting does not do that.

For example, the path in the database for a book is
Code:
Stephen King/The Gunslinger (304)
Which means if I would like to use that field to find cover.jpg, then the path it will be in needs to be
Code:
Stephen King/The Gunslinger (304)/cover.jpg
If I export it, it renames, reorders and strips the number.
Which is to say, they no longer match.

The output I've asked for is directories containing cover.jpg matching the structure Calibre is using for its database.

Calibre2odps doesn't even come close to what I want, nor why.
A static HTML list is useless. I'm generating pages by querying the database directly which allows me to sort, search, limit, paginate, etc.

I even posted a live example of an early version. That's getting generated from an actual metadata.db file. Which is my intended setup.

EDIT: to clarify
http://crysic.com/cadb/
and
http://crysic.com/cadb/?alt

Are live examples of what kind of thing I intend to do.

Last edited by Trel; 12-07-2016 at 03:33 PM.
Trel is offline   Reply With Quote
Old 12-07-2016, 04:29 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Trel - so, assuming you're accessing the metadata.db file via the SQLite API I don't understand your problem. From the db you can access the book folders (you already know that) and read the cover.jpg files - you don't have to expose the other files.

You seem to be asking if anyone has done what you've already half-done. Have you looked in the Related Tools subforum - there's a 'useful threads' sticky at the top.

BR
BetterRed is online now   Reply With Quote
Old 12-07-2016, 05:36 PM   #11
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Quote:
Originally Posted by BetterRed View Post
@Trel - so, assuming you're accessing the metadata.db file via the SQLite API I don't understand your problem. From the db you can access the book folders (you already know that) and read the cover.jpg files - you don't have to expose the other files.

You seem to be asking if anyone has done what you've already half-done. Have you looked in the Related Tools subforum - there's a 'useful threads' sticky at the top.

BR
I was asking if there was a specific way within Calibre to save essentially a backup copy of the "Calibre Library" folder, but with JUST the covers, and not the ebooks.

The answer to what I was asking was "no, you need to use robocopy, rsync, or similar utility".

Basically I was asking if there was some sort of inbuilt function to achieve the same result.

(There wasn't)

The rest was just many people misunderstanding what I was trying to do.

Basically I could have copied the entire 'Calibre Library' folder to a webserver and it would work, but I did not want to include the actual ebook files (piracy, etc).

My end goal is a single file script you drop on a server with the metadata.db and (a bash or batch script to copy the covers sans ebooks, but maintaining the dir structure).

I'm also going to be including in a config ini file the option to not even include the covers, which is working right now. At which point it's drop the config ini, php file, and database in a web accessible folder, and you're good to go.
Trel is offline   Reply With Quote
Old 12-07-2016, 07:28 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Given that calibre doesn't have (need) a specific way of backing up an entire library (see ==>> How do I backup calibre?), why would you expect it to have a specific way to do a selective backup.

If you had done the search I suggested in Post #3 you would have found the robocopy and rsync solutions in stack exchange links somewhere close to the top of the results lists.

When you have your calibre cover server working you could create a thread for it in the Related Tools section and ask the calibre mods to put into that forums Useful Links sticky.

BR
BetterRed is online now   Reply With Quote
Old 12-08-2016, 10:41 AM   #13
Trel
Connoisseur
Trel began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Jan 2010
Device: Onyx Boox Poke 3
Quote:
Originally Posted by BetterRed View Post
If you had done the search I suggested in Post #3 you would have found the robocopy and rsync solutions in stack exchange links somewhere close to the top of the results lists.
I did....

It was after that I posted the "demo" of what I was making, which is to say I had the covers how I wanted them.

It was "solved" at that point, but people kept responding with other options, which I replied to.

Last edited by Trel; 12-08-2016 at 10:44 AM.
Trel is offline   Reply With Quote
Old 12-08-2016, 04:50 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Good oh, and good luck with your project.

If anyone needs to do something similar (create a copy of a directory tree with certain file types only) the Synchronise feature of the Windows shell extension FileMenuTools (FMT) from LopeSoft provides include/exclude filtering.

BR
BetterRed is online now   Reply With Quote
Old 12-14-2016, 03:35 AM   #15
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
free file sync will do it. set it to one way mirror and to include only *.jpg. it has options to include / exclude by file type. it will copy the folder tree and file names exactly from source to target
stumped is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reimport books from another folder to Calibre folder structure? mendhak Calibre 2 10-11-2013 01:18 AM
Library Folder Structure TedBronson Library Management 1 04-03-2013 05:39 PM
2 authors and the folder structure brainvision Library Management 6 08-10-2012 08:42 AM
Folder Structure on Device laos369 Sony Reader Dev Corner 6 05-25-2012 11:23 PM
SD Folder structure ctitanic Amazon Kindle 1 12-30-2007 12:48 PM


All times are GMT -4. The time now is 03:28 AM.


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