![]() |
#1 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2011
Device: Android
|
Uber Calibre script - ubuntu
Hi all
I am new to ebooks. I have got a 'mess' of ebook files on my hardrive, different formats, some compressed, some in a folder directory structure, some by author, some by title. I was hoping someone might have a script that 1) Recursively extracts all tarred files [ find ./ -name '*.rar' -exec unrar e -o+ {} \; ] 2) Organises those files into a single flat directory [ find . -type f -exec mv '{}' . \; ] 3) Removes duplicates [ yes 1 | fdupes -rd . ] 4) Deletes .rar files (space saving) [ find -name "*.rar" -delete ] 5) Copies all epub files to a new folder called 'calibre' or similar 6) Coverts all the remaining .pdf .txt etc files to .epub and moves them to 'calibre' folder 7) Sorts resulting folder alphabetically 8) Goes and grabs the cover art from the internet 9) Makes me a cup of tea whilst it completes! Not much to ask! Any pointers or part-solutions welcomed.. Thanks Sam Last edited by sam_uk; 02-24-2011 at 02:46 PM. |
![]() |
![]() |
![]() |
#2 | ||||||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
![]() Last edited by Starson17; 02-24-2011 at 02:04 PM. |
||||||||||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2011
Device: Android
|
Great thanks for the responses! Seems like I just need to play around some more.
Could you clarify a couple of things? I am indexing *lots of Gigs of ebooks with calibre. Does it basically copy every file? I have separate partitions: / /home As Calibre indexes this content I can see space disappearing in my / (system/ root) partition. What is it doing here? Thanks Sam |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Calibre copies books added to the library into the library folder you specified (which, by the way, should be totally empty when you start your libary, it's a bad idea to select a folder with books already in it). If your library is somewhere on your root partition, you'll see the free space being taken up by Calibre's copies of your books.
|
![]() |
![]() |
![]() |
#5 | |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2011
Device: Android
|
Quote:
My library folder was empty when I started. It is on my /home directory. Is there a command line option I can run to delete the original files as it runs? I do not have enough hard drive space to duplicate the entire collection. Is there also a way to limit the RAM that Calibre uses? It is using 100% of 2Gigs on Ubuntu which means I cannot run the import as a background process.. Thanks Sam |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
![]() Edit to add: Wait, you said your /home is on another partition, and free space on / is shrinking? Then this is not caused by Calibre adding the files to the library. Might be temporary files? Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2011
Device: Android
|
calibredb add -r .
Seemed to be a better way of adding stuff to the library. It did not use all the ram which was nice. |
![]() |
![]() |
![]() |
#8 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
The space you're seeing used in / is temporary files. They are typically only deleted when calibre quits.
There is no way to limit RAM usage. calibe will use as much as it needs / can to complete the task as quick as possible. |
![]() |
![]() |
![]() |
#9 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does anyone have a launchd script for calibre-server? | offby1 | Calibre | 8 | 06-06-2014 08:04 AM |
Converting a film script (PDF) to EPUB with Calibre | alanjay | Calibre | 7 | 10-19-2010 10:41 AM |
Calibre under Ubuntu 9.04 | ebeckhusen | Calibre | 4 | 04-10-2009 04:22 PM |
Cannot install calibre on ubuntu 8.04 | kkkidder | Calibre | 1 | 03-19-2009 10:44 PM |
Error in script on 0.4.113 - 64bit Ubuntu | CaptOzone | Calibre | 10 | 02-12-2009 05:27 PM |