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 11-20-2020, 12:54 PM   #16
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Looking at the first message in the thread, I have to wonder if @groob is not using calibre but another app to try to launch that reference since he mentioned using dash as an example.
DNSB is offline   Reply With Quote
Old 11-20-2020, 04:49 PM   #17
basker
Junior Member
basker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2020
Device: none
Hi -- to the previous comments where this kind of thing works when the Calibre app itself executes the link. Like the following:

Code:
open -a calibre.app --args calibre://show-book/Calibre_Library/12
or

Code:
/Applications/calibre.app/Contents/MacOS/calibre calibre://show-book/Calibre_Library/12
That's not the scenario I'm going for. Generally I see the value of an application URL scheme as allowing you to get to a document in an app from a different app. For example, being able to open a book in Calibre from a note-taking app via a link.

For instance, I'm writing notes and want to make a markdown link to a book in Calibre like this:

Code:
[Link to a Book](calibre://show-book/_hex_-43616c696272655f4c696272617279/206)
I was reading in the Calibre docs here:

https://manual.calibre-ebook.com/url...bre-url-scheme

I'm trying to to do this thing exactly as suggested in the docs:

Quote:
You can even place these links inside HTML files or Word documents or similar and the operating system will automatically run calibre to perform the specified action.
I've tried with docs in Chrome, Safari, and in multiple Markdown editors in preview, and as links in PDFs. All these open Calibre, but don't actually execute the action.
basker is offline   Reply With Quote
Old 11-20-2020, 06:02 PM   #18
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
Platform Windows 10 2004, Calibre 5.5

I store Author information (bio, obits, pictures etc) in Evernote, which I access directly, or via calibre's Author Link field.

I would like to use the calibre URL scheme to show the books for an author, this is as far as I've progressed:

This calibre://switch-library/Test performs as expected - starts calibre if not started and switches to my Test Library

From this calibre://search/Library_Name?q=query

I assumed this calibre://search/Test?Better would switch to the Test library and do the search for Better.

But it doesn't do the library switch before doing the search on the current library for Better. Nor does it switch to the Test library if calibre is not running, it opens the 'last used' library and searches it.

This calibre://search/Test?authors:"=Better Red" does nothing. I tried replacing "Better Red" with hex, as in calibre://search/Test?authors:=42657474657220526564 but that also does nothing.

For my specific use, something like calibre://show-author/Library_Name/author_id would be ideal --- would need to show the author_id somewhere - e.g. a column in Manage Authors that could be copied.

FWIW : I'm using Word as the testbed, I'll get to Evernote once I get it working in Word.

BR
BetterRed is offline   Reply With Quote
Old 11-20-2020, 09:28 PM   #19
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@basker: If it works with one, it has to work with the other. However, that may not be true on macOS which is a particularly gimped OS, typical of Apple software. I'll take a look at it, when I have a moment. The good Lord alone knows what special hoops calibre will have to jump through for Apple's sake.

@BetterRed: You have the syntax wrong, you are missing the q= and yes it should switch libraries before doing the search, however, for some reason I forgot to implement that for the search action, fixed here: https://github.com/kovidgoyal/calibr...0e843883c82253
kovidgoyal is offline   Reply With Quote
Old 11-21-2020, 01:42 AM   #20
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yup, I was correct. macOS needs an extra hoop to jump through, because it handles URLs by sending messages to applications rather than just running them with commadn line arguments. This takes care of it: https://github.com/kovidgoyal/calibr...42bfaae1cb5fb5
kovidgoyal is offline   Reply With Quote
Old 11-21-2020, 03:44 AM   #21
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 kovidgoyal View Post
@BetterRed: You have the syntax wrong, you are missing the q= and yes it should switch libraries before doing the search, however, for some reason I forgot to implement that for the search action, fixed here: https://github.com/kovidgoyal/calibr...0e843883c82253
One for me and one for you

BR
BetterRed is offline   Reply With Quote
Old 11-21-2020, 05:55 AM   #22
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
Working great - once I add the author search links to my Authors notebook entries I can cast the calibre version 2.0 server adrift

BR
BetterRed is offline   Reply With Quote
Old 11-21-2020, 12:52 PM   #23
groob
Enthusiast
groob began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
Quote:
Originally Posted by DNSB View Post
Looking at the first message in the thread, I have to wonder if @groob is not using calibre but another app to try to launch that reference since he mentioned using dash as an example.
I was, indeed! I was just opening the simple url
calibre://show-book/Calibre_Library/1
and I can confirm that this indeed open calibre.

Then I've tried the suggested approach:
open -a calibre.app --args calibre://show-book/Calibre_Library/1
but that doesn't work either.

Btw, apart this apparent bug on my MacOs why can't we just simply use the plain url calibre://show-book/Calibre_Library/1 ?
This way we could simply use as a standard link in any note taking app.
Is the `open -a calibre.app` part absolutely necessary?
groob is offline   Reply With Quote
Old 11-21-2020, 05:31 PM   #24
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
Linking books has been at the top of my calibre wish-list forever.

You can use calibre protocol URI's in long text columns to link related items within and across libraries. I already have a custom long text column called "Related\#related" in my major libraries.

So, I can now watch Kurosawa's Ran (or read the Screenplay/Storyboard PDF) in my Movies library via a calibre://view-book/ link in the Related custom column of King Lear in my Books library, and get back to King Lear via a calibre://show-book/ link in the Related custom column of Ran my Movies library.

Fantastic

BR
BetterRed is offline   Reply With Quote
Old 11-21-2020, 05:53 PM   #25
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
I originally posted this in the JobSpy plugin thread.

Kovid has decided the suggestion was worth including in the core


Suggestion - a tool to create and copy calibre URL links to the clipboard for the selected book, something like:
  • Create a show link would copy a calibre://show-book/<library_name>/<book_id> link to the clipboard;
  • Create a View link would copy a calibre://view-book/<library_name>/<book_id>/<format> link to the clipboard, would need a selector drop down if the book had multiple formats.

BR

Last edited by BetterRed; 11-23-2020 at 03:02 PM.
BetterRed is offline   Reply With Quote
Old 11-22-2020, 08:38 PM   #26
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,618
Karma: 61176603
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I would use this too.
ownedbycats is offline   Reply With Quote
Old 11-22-2020, 10:05 PM   #27
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
Suggestion - a tool to create and copy calibre URL links to the clipboard for the selected book, something like:
  • Create a show link would copy a calibre://show-book/<library_name>/<book_id> link to the clipboard;
  • Create a View link would copy a calibre://view-book/<library_name>/<book_id>/<format> link to the clipboard, would need a selector drop down if the book had multiple formats.

BR
https://github.com/kovidgoyal/calibr...1b4898ee2c8234
kovidgoyal is offline   Reply With Quote
Old 11-23-2020, 05:12 AM   #28
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
Great - I'll delay updating my existing interbook links for a bit.

Hmmm - let's try for the trifecta, how about a calibre://search/<library-name>?q=authors:"=<author-name>" in the Authors context menu.

Stay Safe - BR
BetterRed is offline   Reply With Quote
Old 11-23-2020, 07:50 AM   #29
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
Great - I'll delay updating my existing interbook links for a bit.

Hmmm - let's try for the trifecta, how about a calibre://search/<library-name>?q=authors:"=<author-name>" in the Authors context menu.

Stay Safe - BR
https://github.com/kovidgoyal/calibr...89484116f85c41

this is the context menu you get from clicking the author in the book details panel, not the one in the tag browser.
kovidgoyal is offline   Reply With Quote
Old 11-23-2020, 12:51 PM   #30
groob
Enthusiast
groob began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
Quote:
Originally Posted by kovidgoyal View Post
Yup, I was correct. macOS needs an extra hoop to jump through, because it handles URLs by sending messages to applications rather than just running them with commadn line arguments. This takes care of it: https://github.com/kovidgoyal/calibr...42bfaae1cb5fb5
Great you could find the bug! Thanks!
Is the fix already published in a new build already or should we wait a bit?
groob is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html to pdf error: Blocking URL request with scheme: https bobwolfe Conversion 8 06-15-2021 06:04 AM
Help with URL Scheme for Google Translate (Mobile) MeSue Marvin 30 10-04-2013 10:53 AM
Would anyone know Slovoed's URL Scheme Heitor Marvin 3 09-25-2013 01:16 AM
Kobo custom font, naming scheme sneakyspider Kobo Reader 3 05-16-2013 04:27 AM


All times are GMT -4. The time now is 04:59 AM.


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