|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
Tags |
calibre, comments, links, url |
|
![]() |
||||
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 |