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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2020, 01:10 PM   #1
groob
Member
groob began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
Custom URL Scheme

Hello,
I was wondering if a Custom URL Scheme does exist or could be implemented to launch the app passing some parameters to it.

My use case would be to launch the app passing a search string (or book id in the library) in order to use this link from another app or website.

An example could be the (mac) Dash App. It uses the
Code:
dash://{query}
Custom URL Scheme to launch the app passing `{query}` as a search parameter.

Would anyone else find this useful or just me?
Would it be feasible?
groob is offline   Reply With Quote
Old 11-19-2020, 01:18 PM   #2
capink
Zealot
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 123
Karma: 46940
Join Date: Aug 2015
Device: Kindle
I believe the latest calibre version have what you asking for. Take a look here.
capink is offline   Reply With Quote
Advert
Old 11-19-2020, 01:24 PM   #3
groob
Member
groob began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
AWESOME!!! :]
groob is offline   Reply With Quote
Old 11-19-2020, 01:34 PM   #4
groob
Member
groob began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
Follow-up question:
Given we now have this awesome functionality, does it exist a way to export libraries and book lists as textual data? For example my entire book list as CVS.

This would be very useful in building these custom urls having the entire list of identifiers of my books/libraries
groob is offline   Reply With Quote
Old 11-19-2020, 01:42 PM   #5
capink
Zealot
capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.capink has every book they ever wanted in electronic form on their reader.
 
Posts: 123
Karma: 46940
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by groob View Post
Follow-up question:
Given we now have this awesome functionality, does it exist a way to export libraries and book lists as textual data? For example my entire book list as CVS.

This would be very useful in building these custom urls having the entire list of identifiers of my books/libraries
Select the books you want to export, then go to convert books menu > create a catalog of books in your library.
capink is offline   Reply With Quote
Advert
Old 11-19-2020, 03:06 PM   #6
groob
Member
groob began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
I'm having a problem with this.

My library is located for example at '/Users/myuser/Calibre Library', so accordingly to the manual I call the url by replacing any space in the library name with an underscore `_`

I have tried:
- `calibre://show-book/Calibre_Library/1`
- `calibre://show-book/Users/myuser/Calibre_Library/1`
- `calibre://search/Calibre_Library?q=mysearch`

All of them open the application but nothing more. So I guess there is a problem in my library name, otherwise I'm not sure what I'm doing wrong.

This is not clear for me, from the Manual:
Quote:
Library names are the folder name of the library folder with spaces replaced by underscores.
Are we talking about full paths or just the folder name containing the library?


Please let me know if I should open another thread for this specific problem

Last edited by groob; 11-19-2020 at 03:09 PM.
groob is offline   Reply With Quote
Old 11-19-2020, 04:35 PM   #7
georgemk
Connoisseur
georgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tongue
 
Posts: 89
Karma: 22792
Join Date: Oct 2019
Device: nook Simple Touch with Glowlight
Are you using quote marks around your command string?

I used this and it opened Calibre and showed the result of the query
Quote:
calibre calibre://search/Calibre_Library?q=hex
This is using Calibre 5.5 on Windows 10
georgemk is offline   Reply With Quote
Old 11-19-2020, 10:18 PM   #8
groob
Member
groob began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Oct 2020
Device: Kindle Paperwhite (1)
Quote:
Originally Posted by georgemk View Post
Are you using quote marks around your command string?
No, no, old habit for formatting code in other places like github.
I'using standard strings like this: calibre://show-book/Calibre_Library/1

Calibre is opening but does nothing
groob is offline   Reply With Quote
Old 11-19-2020, 11:23 PM   #9
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: 8,832
Karma: 40802167
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
Quote:
Originally Posted by groob View Post
I'using standard strings like this: calibre://show-book/Calibre_Library/1
Calibre is opening but does nothing
Since calibre is not on my path, I used the following to launch calibre:
Code:
"C:\Program Files\Calibre2\calibre.exe"
I then tried two command lines:

Code:
"C:\Program Files\Calibre2\calibre.exe" calibre://show-book/Main/23863
This one opened calibre with the book with ID=23863 selected. 1 did not work since book ID=1 is long since gone <the directory name would end with (1)>.

Code:
"C:\Program Files\Calibre2\calibre.exe" calibre://search/Main?q=crooked
This one ran a search for crooked and came up with 13 hits.

Last edited by DNSB; 11-19-2020 at 11:49 PM.
DNSB is offline   Reply With Quote
Old 11-20-2020, 06:37 AM   #10
georgemk
Connoisseur
georgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tonguegeorgemk can tie a knot in a cherry stem with his or her tongue
 
Posts: 89
Karma: 22792
Join Date: Oct 2019
Device: nook Simple Touch with Glowlight
I don't know what to add.

As I've shown the manual is correct in that changing any spaces in the library name to underscore works.

Are you sure that there isn't anything odd about your calibre library name? Like an invisible character or something?

I also used calibre-debug -g calibreurl to launch calibre to do the search and it also worked. But unfortunately it doesn't show anything to do with the URL or the library name, so it wasn't giving me any clue if I misspelt the library name or not.

Last edited by georgemk; 11-20-2020 at 06:41 AM. Reason: Add debug paragraph
georgemk is offline   Reply With Quote
Old 11-20-2020, 07:09 AM   #11
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: 38,162
Karma: 16793319
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Open a book from the library in the calibre viewer, then click on Go to->Location and copy the URL from there. Adjust it as needed to do other things.
kovidgoyal is offline   Reply With Quote
Old 11-20-2020, 11:35 AM   #12
basker
Junior Member
basker began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2020
Device: none
Have the same problem.

Hi,

I can't seem to get this working either. I'm on macOS with Caliber 5.5.

I have a library name "Calibre Library". I opened a book to get the URL.

The URL I get from the Calibre Viewer is:

Code:
URL for this position: calibre://view-book/_hex_-43616c696272655f4c696272617279/206/EPUB?open_at=epubcfi(/2/2/4/2@49.92:50)
I then made a new URL for showing the book:

Code:
calibre://show-book/_hex_-43616c696272655f4c696272617279/206
When I click this, Calibre opens but doesn't go anywhere, or show the book.

Just to check I made sure things made sense (0a at end is null terminator):

Code:
xxd -p <<< "Calibre_Library" 
43616c696272655f4c6962726172790a
I also tried hex encoding with a space instead of underscore (removed the 0a in the URL):
Code:
xxd -p <<< "Calibre Library" 
43616c69627265204c6962726172790a

calibre://show-book/_hex_-43616c69627265204c696272617279/206
In this case, Calibre also opens but doesn't go anywhere, or show the book.

Thanks!
basker is offline   Reply With Quote
Old 11-20-2020, 01:39 PM   #13
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: 38,162
Karma: 16793319
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works fine for me on macOS, running:

/Applications/calibre.app/Contents/MacOS/calibre calibre://show-book/Calibre_Library/12


replace 12 above with the id of some book in the library.
kovidgoyal is offline   Reply With Quote
Old 11-20-2020, 01:41 PM   #14
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: 38,162
Karma: 16793319
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Or, via launch services:

open -a calibre.app --args calibre://show-book/Calibre_Library/12
kovidgoyal is offline   Reply With Quote
Old 11-20-2020, 01:42 PM   #15
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: 38,162
Karma: 16793319
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The launch services one does not however work if calibre is already running.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:54 AM.


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