Is it possible to add clickable Book Ids on the Book Details pane (right side of the UI)?
Or else, can I make clickable references using the Calibre URL scheme in some field? I have tried adding <
calibre://show-book/mylib/100> in comments, but it isn't clickable.
Use case would be to create a custom column for "Related Titles" or "See this", then add some Book IDs, that could be clicked on the details pane to select the linked titles.
Theoretically I think this would be possible if you use a tag-like column to store the book IDs and then a composite (taglike?) HTML column to build them into URLs. I'm not sure how it'd work in practice.
Take a look at this post, though it's using the built-in identifiers rather than a custom column to build from:
https://www.mobileread.com/forums/sh...12&postcount=2It never ceases to amaze me how many Calibre "hidden" features I keep forgetting and rediscovering.
I knew there was a template editor for custom columns, but couldn't find it...
The secret portal is on the right-click, as shown in attached cap!
The most I was able to do, so far, was create custom columns for isbn and amz identifiers, using the approach from your referenced post:
Code
{identifiers:select(isbn)}
I think I'd prefer to reference the Calibre Library Book id...
In trying to guess how to do this, I got template errors for {select(book_id)} and {select(id)}...
The search
id:"=22" returns "book number 22" in the library.
Shouldn't {select(id)} work?
edit: all I needed was simply {id} in the template field.
Now, on to the tricky part...
edit 2: Well, while it was nice to have the built-in 'id' show up in details panel (which wasn't selected in "displayed metadata"), I think what I wanted is too difficult to implement without some plugin interaction.
Quote Comfy.n
Is it possible to add clickable Book Ids on the Book Details pane (right side of the UI)?
Or else, can I make clickable references using the Calibre URL scheme in some field? I have tried adding <
calibre://show-book/mylib/100> in comments, but it isn't clickable.
Use case would be to create a custom column for "Related Titles" or "See this", then add some Book IDs, that could be clicked on the details pane to select the linked titles.
calibre:// is a URL, to make clickable in HTML you need to wrap it in <a ref > tags. Easiest way to do that in the Comments editor is to press Ctrl+L where you want it, and that will pop this dialogue:
show attachment »With the values I entered, this HTML is generated
Code
<p><a href="calibre://show-book/_hex_-54657374/311"><span style="color: #6cb4ee">The Fishing Fleet</span></a></p>
Quote BetterRed
calibre:// is a URL, to make clickable in HTML you need to wrap it in <a ref > tags. Easiest way to do that in the Comments editor is to press Ctrl+L where you want it, and that will pop this dialogue:
show attachment »With the values I entered, this HTML is generated
Code
<p><a href="calibre://show-book/_hex_-54657374/311"><span style="color: #6cb4ee">The Fishing Fleet</span></a></p>
wheeeeeeeeeeeee, that works!
Hey BR, what programs do you recommend for screenshots?
While I love
MWSnap, for its auto-saving template and other features, I miss annotations/drawing capabilities.
Today I mainly use Windows snip and sketch, and annotate with IrfanView. Before S&S came along I used Greenshot. If S&S had autosave it would be perfect - for me.
BR
Quote BetterRed
Today I mainly use Windows snip and sketch, and annotate with IrfanView. Before S&S came along I used Greenshot. If S&S had autosave it would be perfect - for me.
BR
Very nice to see that IV has that arrow feature in the Paint Dialog, I think that's essential for screenshot annotation. If XnView had that, it would be perfect :P
Another way to do this is to generate the links directly in a composite column. An example template is attached.
This template depends on there being a column 'Text behaves like tags' named #comp2 that contains the book ids of interest. (I reuse existing test column names.) The template in column #comp3 (composite, contains html) generates a comma-separated list of clickable links from the book ids in #comp2. See the screen capture. You would normally hide #comp3 in the book list. You would of course change the lookup names to the columns you made.
Note also the column #comp2. This contains the template {id} so I can easily see them. Having this is up to you. It certainly isn't necessary.
Once set up, this is easier than pasting links into comments. The list of ids in the column is easily editable, with the resulting links automatically generated.
Here is the template. It requires calibre 6.5.
Code
program: j = ''; for id in $#mytextmult: if j then j = j & ', ' fi; j = j & '<a href="' & 'calibre://show-book/_hex_-' & to_hex(current_library_name()) & '/' & id & '">' & id & '</a>' rof
which produces this:
show attachment »Enhancement: the template could verify that the id actually exists, which can happen because of an input error or deleting a book. If the id doesn't exist then a message is displayed. Something like this:
Code
program: j = ''; for id in $#mytextmult: if j then j = j & ', ' fi; id_exists = book_count('id:' & id, 0); if id_exists != 1 then j = j & 'No such id ' & id else j = j & '<a href="' & 'calibre://show-book/_hex_-' & to_hex(current_library_name()) & '/' & id & '">' & id & '</a>' fi rof
which produces this:
show attachment »I ended up creating three custom columns:
- rel_id: stores the book id for the related title (just one ID allowed). It's entered manually, as the first step to accomplish what I wanted.
- rel_urltxt: composite column with this template: calibre://show-book/mylib/{rel_id}
This column would be enough for my use case, but it can't be clicked. So...
- related: this one is where I get the clickable calibre URL. It's a comments field that I manually fill by copying the text from rel_urltxt, opening the Metadata Edit dialog at the "related" field, pressing control + L, and pasting it.
Note: after clicking the calibre URL, the Related Title gets selected. But I noticed that, when there's an active query on the library (search bar contains any expression), it doesn't get visually selected, unless it is one of the results of that expression