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 01-23-2013, 01:22 PM   #1
JuanDescole
Junior Member
JuanDescole began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kindle
Question Adding files to a book's folder?

Hello everyone!

I have been using Calibre to sort my eBook collection and so far I have been very happy with it. However, I have some books that include external files.

To be more specific, some of my programming books includes sample code as separate files, and normally, these were kept on a folder in the same directory the EBook resides.

I have checked the official manual and FAQ, and so far I have understood that the folder structure in my Calibre library is something I must not mess with. So, just putting the sample code files inside the folder that Calibre created is not an option.

What can I do? According to the FAQ:

Quote:
If you want to add a file associated to a particular book, use the top right area of Edit metadata dialog to do so. Then, calibre will automatically put that file into the correct folder and move it around when the title/author changes.
However, when I try to do that, it only lets me add ONE file. Is there any way to handle this issue?
JuanDescole is offline   Reply With Quote
Old 01-23-2013, 01:47 PM   #2
mdb5972
Member
mdb5972 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2011
Device: Sony PRS350
Idea:

ZIP/RAR them up and add them that way...
mdb5972 is offline   Reply With Quote
Old 01-23-2013, 03:48 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: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
In Windows - create a shortcut to the source code folder - rename it so that it has EXACTLY the same name as the book has in the Calibre Library, e.g. "Fred Bloggs - Programming in Binary.lnk"

Configure Add Books to Automerge new formats

Now add the shortcut as you normally would. It will appear as a LNK file in the relevant Book Details panel. If you click on the LNK format in the Book Details panel your source code folder will open in Windows Explorer.

I'm not sure if support for LNK files is documented anywhere. I looked but didn't find it - but...

OS/X Alias files are similar to Windows shortcut files
Linux Softlinks are vaguely similar to Windows shortcut files.

If OS/X Alias and/or Linux Softlinks don't work, then you can put a hyperlink to the folder in the Comments or in a Custom Column of type Long Text. Of course you can also do that in Windows if you prefer.

BR
BetterRed is offline   Reply With Quote
Old 01-24-2013, 11:08 AM   #4
JuanDescole
Junior Member
JuanDescole began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kindle
@BetterRed: Your idea looked very good, but after trying... It doesn't work. Calibre doesn't let me add .lnk files. When I try to do so, it "opens" the shortcut, taking me to the folder it points to. I have tried other ways to add it, and it seems impossible... It doesn't treat the .lnk as a file.

JuanDescole is offline   Reply With Quote
Old 01-24-2013, 12:45 PM   #5
calvin-c
Guru
calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.
 
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
Despite the warning you *can* add files to the book's folder-but Calibre will ignore them. For the example you cite I'd say your best option would be to edit the HTML/ePub so the book links properly to the sample files. You'd need to copy the sample files manually though, keeping them in the same relative position vis-a-vis the book (e.g. in the same folder). You'd also need to know some HTML-please note that I'm *not* recommending this as it's easy to mess things up when editing generated HTML, but it certainly is possible.
calvin-c is offline   Reply With Quote
Old 01-24-2013, 09:20 PM   #6
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JuanDescole View Post
@BetterRed: Your idea looked very good, but after trying... It doesn't work. Calibre doesn't let me add .lnk files. When I try to do so, it "opens" the shortcut, taking me to the folder it points to. I have tried other ways to add it, and it seems impossible... It doesn't treat the .lnk as a file.

@JuanDescole - I believe it does work, it's my probably explanation that doesn't work.

My 'methods' do NOT put the extra material (source code, videos etc) into the book folder created by Calibre.

The method I suggested provides the means to access the extra material from within the Calibre program via the use of Shortcut (.lnk) files. The material itself must be stored and managed outside of the Calibre Library folders. Calibre is only aware of the .lnk file, it is NOT aware of whatever the .lnk file is targeting - Windows takes care of that.

In Capture1 you see the Add books settings - I've underlined the critical setting. And you also see two explorer windows

The one on the left is the Calibre's book folder for "Program in KDF 9 ..." - I used the "click to open" link in Book Details to open the explorer window - I need to open it that so that I can copy the file name of the ebook into the clipboard.

The one on the right is a Test Links folder I created - the source code etc is in the folder "Auto Coder Samples", I created a shortcut to that folder and renamed it "Program in KDF 9 Autocoder - Fred Bloggs.lnk" - by pasting the file name I copied into the clipboard from the book folder - this ensures it's EXACTLY the same.

In Capture2 I've drag/dropped the Program in KDF 9 Autocoder - Fred Bloggs.lnk file from the Test Links folder into the main Calibre book list area. Calibre pops a message telling me about the 'duplicate' book and how it's merged it according to the Add Books settings - I click OK

In Capture3 you see the results - the Book folder has a copy of the shortcut file, the Book Details panel shows a LNK format

When I click on the LNK format in the Book Details I see the content of "Test Links\Auto Coder Samples" which is the target of "Program in KDF 9 Autocoder - Fred Bloggs.lnk"

BR

I hope no one expected to see KDF 9 Autocoder samples. You can see Atlas Autocoder here. KDF 9 Autocoder was more or less the same.

Attached Thumbnails
Click image for larger version

Name:	Capture1.JPG
Views:	634
Size:	214.9 KB
ID:	99991   Click image for larger version

Name:	Capture2.JPG
Views:	506
Size:	169.4 KB
ID:	99992   Click image for larger version

Name:	Capture3.JPG
Views:	524
Size:	180.9 KB
ID:	99993  

Last edited by BetterRed; 01-24-2013 at 09:31 PM. Reason: clarity
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Files To Calibre Folder JayLaFunk Library Management 13 01-15-2012 03:48 PM
Adding book to NOOK with Calibre question - wierd files appeared Snauzoo Calibre 3 07-22-2011 10:57 AM
getting deleted book files when adding books foxieden Library Management 3 06-06-2011 04:00 PM
Adding a folder of chapters pendragginp Calibre 4 03-25-2010 08:07 AM
Folder recursion when adding books? jamesbeat Calibre 1 06-06-2009 05:41 PM


All times are GMT -4. The time now is 01:28 PM.


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