Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2015, 08:02 PM   #31
Rob Burgess
Junior Member
Rob Burgess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2015
Location: Montreal, QC
Device: Kindle for Android
Quote:
Originally Posted by BetterRed View Post

@Rob Burgess - but for that many books I would wrap a script/batch file around the calibre command line program, calibredb add and do something else whilst it was chugging away - if I was minded I could echo a counter in the script.

BR
Hey BR,
If I had any idea how to write scripts I might have :-) But for one database rebuild it didn't seem worth going to the trouble of learning how :-)

Unfortunately I don't like the flat format that Calibre uses for its database so I have to export the books as a more user friendly format. It would have been a lot easier to just point Calibre at a Calibre recognised format but Kovid has said in the past that he has no interest in allowing alternate formatting, so I have to make do with rebuilding the database like this.

Life sucks sometimes, but not having a backup at all would really suck LOL

--
Rob

Last edited by Rob Burgess; 03-09-2015 at 08:20 PM.
Rob Burgess is offline   Reply With Quote
Old 03-09-2015, 08:51 PM   #32
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: 29,832
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Rob Burgess View Post
Hey BR,
If I had any idea how to write scripts I might have :-) But for one database rebuild it didn't seem worth going to the trouble of learning how :-)

Unfortunately I don't like the flat format that Calibre uses for its database so I have to export the books as a more user friendly format. It would have been a lot easier to just point Calibre at a Calibre recognised format but Kovid has said in the past that he has no interest in allowing alternate formatting, so I have to make do with rebuilding the database like this.

Life sucks sometimes, but not having a backup at all would really suck LOL

--
Rob
FLAT Who you been listening to?

Calibre is a full SQL relational DB with 24 tables (as delivered) plus Indexes
theducks is online now   Reply With Quote
Old 03-09-2015, 09:17 PM   #33
Rob Burgess
Junior Member
Rob Burgess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2015
Location: Montreal, QC
Device: Kindle for Android
I'm not referring to the internal structure of the database file, I'm referring to the way the books are saved to my hard drive. It's one directory with every author as a subdirectory. I would love to make better use of the alphabet :-)

My Calibre database is:

Calibre Library
-----author
----------titles

I asked Kovid if this could be switched to:

Calibre Library
-----A
----------Author
---------------Titles
-----B
Etc

And he said "no". So, to me, under the Calibre Library is a flat list of every name. Do you know of a way to change this?

--
Rob
Rob Burgess is offline   Reply With Quote
Old 03-09-2015, 09:36 PM   #34
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: 20,591
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rob Burgess View Post
I'm not referring to the internal structure of the database file, I'm referring to the way the books are saved to my hard drive. It's one directory with every author as a subdirectory. I would love to make better use of the alphabet :-)

My Calibre database is:

Calibre Library
-----author
----------titles

I asked Kovid if this could be switched to:

Calibre Library
-----A
----------Author
---------------Titles
-----B
Etc

And he said "no". So, to me, under the Calibre Library is a flat list of every name. Do you know of a way to change this?

--
Rob
@Rob Burgess - it ain't gunna happen mate.

But I fail to see what the difference is between navigating a tree such as the one you suggest in the calibre tag browser and a similar tree in a file system manager. One b-tree index is much the same as the next - who cares if its in a SQLite database, an NTFS Master File Table or an HFS Attribute file.

And a file manager won't easily give you similar trees for publishers, tags, series, and any columns/properties you might want to add.

BR
BetterRed is online now   Reply With Quote
Old 03-10-2015, 08:06 AM   #35
Rob Burgess
Junior Member
Rob Burgess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2015
Location: Montreal, QC
Device: Kindle for Android
Quote:
Originally Posted by BetterRed View Post
@Rob Burgess - it ain't gunna happen mate.

But I fail to see what the difference is between navigating a tree such as the one you suggest in the calibre tag browser and a similar tree in a file system manager. One b-tree index is much the same as the next - who cares if its in a SQLite database, an NTFS Master File Table or an HFS Attribute file.

And a file manager won't easily give you similar trees for publishers, tags, series, and any columns/properties you might want to add.

BR
Hey BR,
My reason for wanting it actually has nothing to do with day to day usage. A couple of years ago I had a drive failure and lost my Calibre Library. I went to my Carbonite backup and for some reason they were unable to properly sync, which meant I couldn't use their restore manager to grab everything. However I could browse to what I wanted, click it, and have those files restored.

Easy.

Except that their server couldn't restore that many items in one go. If the library was stored as I wanted I could have chosen to restore "A" and then "B", etc. Instead I had to highlight a group of authors and restore them. Then find my place, highlight another group, and restore them. This made the process so much more complicated than it needed to be.

I haven't done any database programming in 20 years but I don't recall it being that difficult to parse the first letter of a word (author's name) and include that in the file structure. But I guess I'm in the minority. So I save a copy of my library outside of Calibre and use that for backups.

--
Rob
Rob Burgess is offline   Reply With Quote
Old 03-10-2015, 12:30 PM   #36
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: 20,591
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rob Burgess View Post
Hey BR,
My reason for wanting it actually has nothing to do with day to day usage. A couple of years ago I had a drive failure and lost my Calibre Library. I went to my Carbonite backup and for some reason they were unable to properly sync, which meant I couldn't use their restore manager to grab everything. However I could browse to what I wanted, click it, and have those files restored.

Easy.

Except that their server couldn't restore that many items in one go. If the library was stored as I wanted I could have chosen to restore "A" and then "B", etc. Instead I had to highlight a group of authors and restore them. Then find my place, highlight another group, and restore them. This made the process so much more complicated than it needed to be.

I haven't done any database programming in 20 years but I don't recall it being that difficult to parse the first letter of a word (author's name) and include that in the file structure. But I guess I'm in the minority. So I save a copy of my library outside of Calibre and use that for backups.

--
Rob
@Rob Burgess - you probably shouldn't run carbonite concurrently with calibre, see ==>> I am getting errors with my calibre library on a... - in particular the third paragraph.

It's still true that extracting the first letter of a string is not that hard, the problem is that everyone wants start with a different bit of string - you want author surname, someone else wants series, I'd prefer publisher. Solution - Save to Disk with a template - which I assume is what you use.

You should be able to add books from such a structure via the Add books from directory tree option that assumes the leaf nodes have ONE book.

BR
BetterRed is online now   Reply With Quote
Old 03-10-2015, 05:47 PM   #37
Rob Burgess
Junior Member
Rob Burgess began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2015
Location: Montreal, QC
Device: Kindle for Android
Quote:
Originally Posted by BetterRed View Post
@Rob Burgess - you probably shouldn't run carbonite concurrently with calibre, see ==>> I am getting errors with my calibre library on a... - in particular the third paragraph.

It's still true that extracting the first letter of a string is not that hard, the problem is that everyone wants start with a different bit of string - you want author surname, someone else wants series, I'd prefer publisher. Solution - Save to Disk with a template - which I assume is what you use.

You should be able to add books from such a structure via the Add books from directory tree option that assumes the leaf nodes have ONE book.

BR
Hey BR,
Since I'm no longer backing up the Calibre Library but a copy of it with better organization, I'm not too worried. :-)

My last backup had the books of each author in the author directory and not in separate subdirectories. I've changed that now so I won't have this problem in the future (he says with hope :-) )

I'm surprised that you'd want to sort by publisher - what do you do if an author changes publishers? Or the publisher starts a new imprint and the author moves there?

--
Rob
Rob Burgess is offline   Reply With Quote
Old 03-11-2015, 02:17 AM   #38
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: 20,591
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rob Burgess View Post
I'm surprised that you'd want to sort by publisher - what do you do if an author changes publishers? Or the publisher starts a new imprint and the author moves there?
Purely Hypothetical example

But that said I do browse my music collection by label, say if I stumble on something from Vanguard. So why not books, a collector of feminist literature might want to look at all their books from Virago

BR
BetterRed is online now   Reply With Quote
Old 03-11-2015, 12:22 PM   #39
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: 29,832
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Back in the good old days of Paperbacks I would home in on Publishers IMPRINT (Logo or spine colors) because certain one tended to publish what (style, story theme ...) I liked best

There is a reason Dragonlance appears prominently on their covers

Baen switched from the original BAEN in a keystone to the Dragon or Spaceship.
It allowed the customer to 'home in' quickly on the Fantasy or Science Fiction genere offerings

IMPRINT sells books, not the (big) Publishers name
theducks is online now   Reply With Quote
Old 09-06-2015, 10:42 PM   #40
ectoplasm
Addict
ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.ectoplasm ought to be getting tired of karma fortunes by now.
 
Posts: 255
Karma: 1151364
Join Date: Aug 2009
Device: Aura HD and H2O
One way Calibre will not recognize new files, at least for me with Windows (even if the folder is local) is if they're added from another PC via UNC. Some type of locally initiated file change needs to occur, so I wrote a batch file to scan for files and echo a new .txt to trigger Calibre to recognize the additions.
ectoplasm is offline   Reply With Quote
Old 01-31-2016, 04:55 AM   #41
Danfozzy
Junior Member
Danfozzy began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2016
Device: Android, kindle
Quote:
Originally Posted by ectoplasm View Post
One way Calibre will not recognize new files, at least for me with Windows (even if the folder is local) is if they're added from another PC via UNC. Some type of locally initiated file change needs to occur, so I wrote a batch file to scan for files and echo a new .txt to trigger Calibre to recognize the additions.
would be useful if you shared it? im having the same issue, as you have just explained

Last edited by Danfozzy; 01-31-2016 at 04:59 AM.
Danfozzy is offline   Reply With Quote
Old 06-10-2016, 11:33 PM   #42
lcarlton1102
Junior Member
lcarlton1102 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: samsung galaxy
I had the same problem. It was adding and then all of a sudden it seemed to stop working for me. The files I added seemed to have a Read only attribute. I unchecked the read only attribute in the properties and viola! caliber automatically added it. Hope it helped, took me awhile to figure it out myself. Hope this works for you.
lcarlton1102 is offline   Reply With Quote
Old 11-01-2018, 06:00 AM   #43
sdblepas
Junior Member
sdblepas began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2010
Device: none
Hi Guys
Found this post on google
don't know if that will help but I wrote a small (stupid) scripts to do the following
1. see if there's a new book to add
2. convert the book from epub to mobi
3. add the book
4. add the .mobi as a format of the book
5. rm the book
6. restart calibre

I'm on Ubuntu with calibre-server (no UI)

I call the script vi cron

There's a lot that can be added here with parameters and book format ... I'll see if I get to it and update this thread

Quote:

#!/bin/sh

cd <PATH TO DIR>

count=`ls -1 *.epub 2>/dev/null | wc -l`
if [ $count -eq 0 ]; then
echo "File not found!"
exit 0
fi
cd <PATH TO DIR>

for book in *.epub
do
echo "Converting $book"
ebook-convert "$book" "$(basename "$book" .epub).mobi"
VALUE=$(calibredb add basename "$book" --with-library=~/calibre-library)
ID=$(echo $VALUE | cut -d':' -f 2)
calibredb add_format $ID "$(basename "$book" .epub).mobi" --with-library=~/calibre-library
done

rm *.epub *.mobi
sudo systemctl restart calibre.service

run it via cron

Last edited by sdblepas; 11-04-2018 at 06:29 AM.
sdblepas is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Adding books Canonshooter Calibre 5 06-29-2012 09:22 AM
Automatically remove tags when adding books garytshepherd Library Management 12 03-13-2012 11:16 AM
Sigil Automatically Adding Code christinerose Sigil 7 04-28-2011 11:07 AM
Automatically Add Books to Calibre from Directory pjd6896 Calibre 0 12-02-2010 09:15 PM
Automatically adding additional formats for a book? HarryT Calibre 4 08-26-2009 11:57 AM


All times are GMT -4. The time now is 09:50 PM.


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