Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-22-2014, 07:32 AM   #1
Januz
Junior Member
Januz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2014
Device: iPad
Use links in Calibre comments with custom URL schemes (e.g., DEVONthink) on Mac OS X

Hi,

I am using Calibre on Mac OS X.

As one cannot add a folder that holds supporting information (mp3s, pics, etc.) for specific e-books to Calibre directly, I thought I would put those in a folder in DEVONthink and then add a link to the folder (e.g., x-devonthink-item://XXX) to the Calibre comments for this book be able to see that there are supporting files and to be able to open the folder containing them by clicking on the link. The advantage over linking to a folder on the HDD is that I can move the folder inside DEVONthink without the link becoming invalid.

What happens, though, is that the browser is launched to open the URL which fails obviously.

Did anybody of you succeed in adding custom URLs?

Thanks,

J
Januz is offline   Reply With Quote
Old 01-23-2014, 03:47 AM   #2
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,548
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Januz - Have you tried adding an alias file that references the supporting information folder.

My understanding is that OS/X alias files are similar to Windows shortcut (.lnk) files. Because they are operating system objects rather than file system objects (a'la symlinks, hardlinks etc) the OS can keep track if them if they are moved etc see http://en.wikipedia.org/wiki/Alias_%28Mac_OS%29

The only way I've found to get a Windows "shortcut to a folder" file into calibre is via the calibre command http://manual.calibre-ebook.com/cli/calibre.html, this adds the .lnk file as a book which I then Merge with the target book.

Fortunately the Windows Send To 'feature' maps to the calibre command line. So I 'right click' the supporting folder, select Create Shortcut, 'right click' the shortcut just created, select Send To->calibre. Then in calibre I merge the book just added (ie the .lnk file) into the target book. BTW I don't actually 'right click', I tap the menu key instead.

If the supporting files are 'static' I bundle them into a 7zip archive and add that to the book, but if they are dynamic or volatile then I use the .lnk file - sometimes I use both.

BR
BetterRed is online now   Reply With Quote
Old 01-26-2014, 06:07 PM   #3
Januz
Junior Member
Januz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2014
Device: iPad
@BetterRed

Thanks for your suggestions! Sadly, one cannot use an Alias (at least not one that is pointing to a folder) as "book" in Calibre.

I tried a little and came up with this hack:

1. make a script file containing the following code (replacing the x-devonthink URL with the link to the respective folder):

#! /bin/bash
/usr/bin/osascript <<-EOF
tell application "Finder" to open location "x-devonthink-item://XXX"
EOF
osascript -e 'tell application "Terminal" to quit' &
exit

2. save this file with the .command extension (or - what I did - with a more descriptive extension like "supporting_information" for which you then have to make Terminal.app the default application)

3. import as an additional format for the respective book into Calibre

4. navigate to the enclosing folder and make the file executable (chmod +x ...)

Clicking on the "command" (or "supporting_information") format in Calibre now opens a Terminal, executes the script thus opening the supporting information folder in DEVONthink and closes Terminal again...

Best,

J
Januz is offline   Reply With Quote
Reply

Tags
calibre, comments, links, url

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom columns - comments section? musthavemissedit Library Management 2 01-02-2014 03:17 PM
URL Schemes to launch Marvin kguil Marvin 2 12-23-2013 02:30 AM
Edit Custom Comments Font BetterRed Calibre 9 10-16-2013 07:39 PM
URL schemes for custom menu buttons — share yours holymadness Marvin 14 09-27-2013 11:00 AM
Comments - colour background with links transmitthis Calibre 3 12-07-2011 09:02 AM


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


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