![]() |
#1 |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Automatically load 'template' into Comments field?
Hello, folks
![]() I've been searching and reading posts for a few hours, now, and can't seem to find what I'm looking for (probably just not using the correct terminology...). I want to add a 'template' to the Comments field of each new book I catalogue, containing some HTML code to display alternate/back covers, special characters (—…), etc., and a formatted 'About the Author' section. Is there anywhere in Calibre to enter this so it's automatically picked up and added, instead of me having to copy/paste each time? Here's hoping... |
![]() |
![]() |
![]() |
#2 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,717
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Quote:
![]() Took a brief look at the thread (didn't read all 23 pages...), and if there's a solution there, I fear it might be above my paygrade/skill set. I've never created or dissected a plugin before ![]() I originally just wanted to insert two special characters, an emdash and the ellpisis, as I use both of them heavily in comments and grew tired of typing the codes each time. It seemed natural (to me, anyway) that there would be a section somewhere in the configuration where you could add code or text to automatically populate to a new entry, but no such animal... As time went on, the 'snippet' has grown to include all the aforementioned things. I use a clipboard manager and have the 'template' in it all the time, but that still requires bringing it up, copying, tabbing back to Calibre, clicking in the Comments area and pasting. |
|
![]() |
![]() |
![]() |
#4 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,717
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I was suggesting you have a look at the GFN plugin code not the thread, it's the zip that's attached to the first post.
FWIW: I use a gadget that comes with the Transtools add-in for Word to insert single special chars, I think its packaged with the free version of Transtools, I have it set to pop on Ctrl+Win+S, viz: And Clipboard Fusion is good for boilerplate snippets, I have it set to pop a list of named snippets on Alt+Win+P. For this sort of thing I prefer tools that work everywhere, rather than application specific tools. BR |
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Quote:
Quote:
Might you share your macro? |
||
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Quote:
![]() The first one works... kinda - It adds the empty template to the details pane, but everything gets all jumbled up with the existing details. Also, this is display-only - I want the actual data to reside within the metadata file of the book, able to save with it to disk, etc. The second one: I tried creating a custom comments column and adding my code, but it doesn't seem to retain the template - The field is blank when adding a new book. Also, this would force me to have to go to the Custom Metadata tab to access/edit it, and I stay away from there if I can. I have several added columns (Origin, Price, Read, Retail) but they are all of the yes/no or checkbox variety, accessible from the main Calibre catalog window when adding the new book. Without there being a built-in mechanism for adding a template to the Comments field, I suppose that a manual system like I've been using is going to be the only way... |
|
![]() |
![]() |
![]() |
#8 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,717
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Index of plugins --- which is: Code:
[url=https://www.mobileread.com/forums/showthread.php?t=118764][b][u]Index of plugins[/b][/u][/url] Last edited by BetterRed; 03-18-2021 at 04:48 PM. |
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
It does. Calibre stores custom metadata in the book when sent to device, saved to disk, or polished. For composite (computed) columns both the template and the last calculated value are stored.
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Hmm... I was almost able to reproduce your results with CP, but in the long run, it's still a two- or three-step process, while I had envisioned it to be only one.
I can do basically the same thing with QCopy, the clipboard manager I'm using now. I have the 'template' pinned in it, and ctrl-Q brings it up where I can choose and copy it. I was hoping for a global macro where I could remain in Calibre and simply hit the key combination to copy into it... *sigh* I'll just continue to plod along like I've been doing. Thank You for all the help, BR ![]() |
![]() |
![]() |
![]() |
#11 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Quote:
I'm just used to having everything 'physically' (you know what I mean ![]() |
|
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Dec 2016
Device: Kindle
|
I actually was having the same idea today - I'd like a standard template that I can use to build the Comments container with for all books - where I can have a section to add links to notes on the book, have a place for the contents of a book, a place for author information, a place for translator information, etc.
I have no idea how to do this though - I have my head spinning around as I stumbled on the idea while I was trying to clean up my libraries. And haven't gotten much of that done today - and never got to the reading and note taking I should be doing now. |
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite 4
|
Quote:
![]() Here is the 'template' that I use, simply copying/pasting it into the Comments field: Code:
<p>—…</p> <p style="font-style: italic; font-weight: bold"><span style="color: #ff0000">NOTE: </span></p> <p><a href="https://www.imdb.com/title//"><img src="file:///E:/~eBooks/~~~~~Temp/imdb.gif" width="40"></a> <strong>YEAR Movie with </strong><a href="https://www.imdb.com/name//"><strong style="color: #6cb4ee">ACTOR</strong></a><strong> & </strong><a href="https://www.imdb.com/name//"><strong style="color: #6cb4ee">ACTOR</strong></a></p> <hr> <h3>My Review</h3> <p style="font-weight: bold">TAGLINE</p> <blockquote>*** NOTE: I received an advance eBook copy and this is my honest review *** </blockquote> <blockquote>REVIEW</blockquote> <hr> <h3>About the Author</h3> <p>.</p> <p>★<span style="font-family: 'Arial','sans-serif'; font-size: 14px">✅</span>➜</p> <p>. <strong style="color: #000000; background-color: #00ff00">Website</strong></p> <hr> <h2 align="center">Alternate/Back Cover</h2> <p align="center"><a href="file:///E:/~eBooks/~~~~~Temp/Covers/"><img src="file:///E:/~eBooks/~~~~~Temp/Covers/" width="150"></a></p> <hr> <h2 align="center">Floating Images</h2> <p><a href="file:///E:/~eBooks/~~~~~Temp/"><img src="file:///E:/~eBooks/~~~~~Temp/" width="150" style="float: right; margin-left: 0.5em"></a></p> <p><br></p> An explanation of the different sections:
Then my book's description goes here, followed by...
Note that something is broken? in Calibre version 7.0 and beyond - Image links are not working, forcing me to go back to 6.29.0 until the issue is resolved...
I hope this is helpful for you - I have no idea how mystified or proficient you may be with HTML, so I tried to explain - If you need more help, don't hesitate to ask! I'm not a wizard with HTML, but I get by and I'll try to help ![]() --CloudReader |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template: field vs raw_field | ownedbycats | Library Management | 5 | 03-24-2021 05:27 AM |
How to automatically add comments | MarcDS | Library Management | 3 | 09-01-2017 05:23 PM |
Comments field | emeybee | Calibre | 1 | 05-27-2010 02:01 PM |
Comments field | banjomike | Calibre | 7 | 04-08-2010 02:18 PM |
Comments field | hyperact | Calibre | 3 | 12-28-2008 01:38 PM |