View Single Post
Old 12-20-2016, 04:06 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,825
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice
@skorasaurus - I moved your post to its own thread. The thread you added to was ancient (2011), things have moved on since then. Although there's still no 'official' solution to the problem you pose

You could bundle the code etc into an archive format that calibre won't interpret as an ebook format (such as .7Z) and add that to the book, just drag and drop onto the book details panel. Calibre will register its existence in its database, hence it will survive edits to title and author names and inter library moves etc. The downside is that you have to unpack the archive to see the contents.

You could keep the files in a separate folder and link the folder into the book.
  • On Windows you could create a shortcut (.LNK file) to the folder and drag drop it into the Book details. The advantage of this method is that the Windows Distributed Link Tracking (DLT) service will attempt repair .LNK files if the target is relocated, on later versions of Windows it's normally successful.
  • The above might also work on OSX using ALIAS files, I don't know if OSX has an equivalent to the Windows DLT service.
  • A more general way would be to insert a file URI link into a custom long text column, but if you move or rename the folder the link will break. The long text (comments) editor has a tool to facilitate easy creation of file URIs.
Or you could do what I do, create a 'note' for the book in an Evernote notebook and add the code and other extras to it. An EN note can be a container for any number of files of practically any type and each note has a unique URI, which I copy and paste into a calibre long text custom column.

I prefer this method because I can organise the extra files as I want them, without the limitations of a file manager. I can also scribble my own notes in the EN note, add links to sites such as stackoverflow, and I can access the notes online via a tablet and/or a phone.

BR
BetterRed is offline   Reply With Quote