03-02-2024, 12:39 PM | #16 | ||
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If it is a composite column then you can't make it work until my changes are released. Assuming it isn't a composite column, I think you would be better served by putting the entire URL into the custom column. This would make the column html and puts you in control of its formatting. For example, put this in the column assuming the image is a png: Code:
<img src="data:png;base64, <base64 string for image>" width="100" style="vertical-align: top"> Code:
<p align="center" dir="rtl" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; background-color: transparent">{_author_image}</p> Quote:
When it exists in calibre, you would create a composite column with the template something like this: Code:
program: get_note('authors', $authors, '') then put this in the jacket template: Code:
<div><b>{_composite_label}:</b> {_composite}</div> Last edited by chaley; 03-02-2024 at 12:43 PM. Reason: fixed [code] formatting |
||
03-02-2024, 02:07 PM | #17 |
Enthusiast
Posts: 26
Karma: 30486
Join Date: Dec 2023
Device: Kindle Oasis
|
Thanks again for your help and patience, really appreciated. Unfortunately, putting the entire URL didn't work, the unwanted tags are still created. So, for now, I will continue as I have: e.g. manually paste my table with the author details and image into the comments section and have that added to the jacket when polishing.
But I'm hopeful that your code for getting the notes does end up added to Calibre, because that would be the best solution overall. I'm also happy to have learned about the notes section since it allows me to save this table for each author within Calibre itself (I noticed there's even import/export option), and that's really great. |
03-03-2024, 06:08 AM | #18 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The changes I mentioned in post #16 are now in calibre source, as are the changes so composite columns work in jacket templates.
Here is a capture of a jacket. The image and the text just above it are in the author notes. Last edited by chaley; 03-03-2024 at 06:13 AM. Reason: Add image of the example jacket |
03-04-2024, 05:10 AM | #19 | |
want to learn what I want
Posts: 1,009
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
Last edited by Comfy.n; 03-04-2024 at 05:41 AM. |
|
03-08-2024, 01:33 AM | #20 |
Enthusiast
Posts: 26
Karma: 30486
Join Date: Dec 2023
Device: Kindle Oasis
|
Oh, wow thanks!
I'm going to give it a try, it looks like it would make my life so much easier Edit: So I've followed the example in post #16 excatly. It works as described for showing the author notes as either a pop-up (if the column is visible in the book list) or as part of the metadata. But I am having the same problem with inserting it into my jacket, as I did before. The code in my template for the jacket is excatly like the example in post #16: Code:
<div><b>{_composite_label}:</b> {_composite}</div> Code:
<div><b>composite:</b> <div> <p>some details about the author</p></div></div> Any idea how to work around that? Last edited by tgiladi; 03-08-2024 at 03:25 AM. Reason: Reporting the result of the test |
03-08-2024, 06:58 AM | #21 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Last edited by chaley; 03-08-2024 at 07:00 AM. |
|
03-08-2024, 10:04 AM | #22 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
03-08-2024, 01:02 PM | #23 | |
Enthusiast
Posts: 26
Karma: 30486
Join Date: Dec 2023
Device: Kindle Oasis
|
Quote:
|
|
03-09-2024, 05:27 PM | #24 |
want to learn what I want
Posts: 1,009
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Today I played a bit with the html inside the GR Author Notes plugin, with the purpose of making the composite column fit better in the book details pane. It wasn't easy, so I'd say it was more like the html + css were playing ME.
Changing the picture size was simple, only a matter of adding width to the img tag. Eventually I was able to style the first cell, the one containing the author name, which was the hardest part. Whatever i tried, I would get this styling <strong style="font-family: 'Arial','sans-serif'; font-size: xx-large; color: #ffffff"> Author name </strong></h1></td>, instead of font-size: small or h4/h5 etc... Actually, I can't even tell exactly what was the solution. I'm not sure I'm going to settle down with the current CSS, so it would be great if there was some sort of search and replace scripting to bulk-change the html code inside the notes. I'm sharing the modified version in the attachment in case someone wants to help me tweak it; the only modified file was authornotes.py, in the plugin root folder. I won't request the plugin author a more detailed styling feature, because it must be very difficult to implement, and the plugin is already amazing. Images below show what it looked like before and after the changes I managed to do: before after I had also changed the font-family tag but reverted to Arial for broader compatibility. Arial Narrow seemed a good choice to make the table narrower, but it looked blurry. edit: corrected some padding asymmetry from 1 to 3 in the beginning of the modified plugin. edit2: added some extra styling to enforce centered alignment Last edited by Comfy.n; 03-27-2024 at 01:59 AM. |
03-10-2024, 12:21 PM | #25 |
want to learn what I want
Posts: 1,009
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Thanks to new Export/Import Notes action, I was able to bulk edit the html and fit nicely the notes generated in the book details pane.
It was cool to find that Notepad++ can process 1600+ files all at once, though I'm sure there must be some text replacement tool more fitting to this task. These were the replacements I made: -------------------------------- font-size: xx-large font-size: large ---------------------------- <img style= <img width="140" style= ----------------------------- font-size: 14px font-size: 12px ------------------------------ <h1 <h4 ------------------------- h1> h4> -------------------------------- ----------------------- |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't see description/comments | scarlettruin | Devices | 1 | 02-02-2019 04:37 PM |
Metadata/Comments/Book Description not showing up on Nook | Semco | Devices | 3 | 10-29-2017 02:48 PM |
Incorrect styling with specific CSS | quiris | Marvin | 9 | 07-04-2016 01:04 PM |
Styling Elements in CSS - ADE and Sony | toskpro | Sony Reader | 0 | 07-19-2010 01:55 PM |
CSS Styling not showing up in digital editions | sjkramer | Sigil | 9 | 01-30-2010 10:46 AM |