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 01-22-2025, 06:12 PM   #781
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by correoparaappzz View Post


another question, is it posible to do the same in Book Details?
I don't believe so, most you can do as far as I know is to insert some emoji characters like ▶️ at the rules for identifiers dialog:

Click image for larger version

Name:	MWSnap 2025-01-22, 20_03_13.png
Views:	156
Size:	112.4 KB
ID:	213232

Look&Feel -> Book Details -> Create rules
Comfy.n is offline   Reply With Quote
Old 01-24-2025, 06:53 AM   #782
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
@chaley: ​I went from this on my "Info" column displayed along with Comments field...

📂 {title} by {author} 🔢 {#abc_numeric} 🏚️ Published in {pubdate} by {publisher} 📚 {#pc} 🗓️ TS: {date} 🗓️ LA: {#la} 🗓️ LV: {#last_viewed} ISBN: {identifiers:select(isbn)} 👍Votes: {#v} 👍Rating: {#rr} 🌍 {languages}

to this:

program:
out = '​📂 ' & $title & ' by ' & $author & ' 🔢 ' & $#abc_numeric & ' 🏚️' & if field('pubdate') then 'Published in ' & field('pubdate') else '' fi & if field('publisher') then ' by ' & field('publisher') else '' fi & ' 📚 ' & $#pc & ' 🗓️ TS: ' & $date & if field('#la') then ' 🗓️ LA: ' & field('#la') else '' fi & if field('#last_viewed') then ' 🗓️ LV: ' & field('#last_viewed') else '' fi & if select($identifiers, 'isbn') then ' 🆔 ISBN: ' & select($identifiers, 'isbn') else '' fi & if field('#v') then ' 👍Votes: ' & field('#v') else '' fi & if field('#rr') then ' 👍Rating: ' & field('#rr') & if field('languages') then ' 🌍 ' & field('languages') else '' fi else '' fi


WITHOUT AI... so my head is

The output in Book Details looks like this:

📂 Nineteen eighty-four by George Orwell 🔢 91 🏚️Published in August 2001 by Project Gutenberg of Australia 📚 3 🗓️ TS: 03-09-2024 05:49 🗓️ LA: 22-Jan-2025 15:20 🗓️ LV: 22-01-2025 15:20 🆔 ISBN: 9780241453513 👍Votes: 4800394 👍Rating: 4.19 🌍 eng

And I also have that other secondary Info column you helped me with the other day, like this:

program:
out = '  💾 ';
fmts = list_sort(formats_sizes(), 0, ',') ;
for fmt_data in fmts:
fmt = sublist(fmt_data, 0, 1, ':');
size = sublist(fmt_data, 1, 2, ':');
str = if size ># 0 then strcat(fmt, ': ', human_readable(size), ' | ') else '' fi;
out=strcat(out, str)
rof;
if substr(out, -2, 0) == '| ' then
out = substr(out, 0, -3)
fi;
out

& strcat(
if field('#li') then '​ ✍️ ' & field('#li') else '' fi,
if field('#fav') then ' ⭐: y ' & field('') else '' fi,
if field('#pp') then '​ 📈 ' & field('#pp') & ' pages' else '' fi,
if field('#words') then '​ | ' & field('#words') & ' words' else '' fi,
if field('#ac') then '​ 🟨 ' & field('#ac') else '' fi ,
if field('series') then '​ ▶️ ' & field('series') & ' - ' & field('series_index') else '' fi
)


this one outputs:

💾 EPUB: 295.7 KB | ORIGINAL_PDF: 1.6 MB | PDF: 767.9 KB​ ✍️ https://www.goodreads.com/author/sho....George_Orwell ⭐: y ​ 📈 484 pages​ | 103,810 words​ 🟨 16

I'm finding it fun to assemble these templates but I'd be happy to receive some feedback on overall syntax and alternatives to simplify the code or perhaps convert it to PTM

(the main purpose is to make room for my author Bio column but I also find those lines useful to spot at a glance what metadata is missing that I would like to have displayed)
Attached Thumbnails
Click image for larger version

Name:	MWSnap 2025-01-24, 08_51_49.jpg
Views:	176
Size:	71.7 KB
ID:	213249  

Last edited by Comfy.n; 01-24-2025 at 07:07 AM.
Comfy.n is offline   Reply With Quote
Advert
Old 01-24-2025, 05:10 PM   #783
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,458
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
I'm finding it fun to assemble these templates but I'd be happy to receive some feedback on overall syntax and alternatives to simplify the code or perhaps convert it to PTM
Two suggestions that will make the templates easier to read, at least for me.

For the first template, replace bits that look like
Code:
if field('pubdate') then 'Published in ' & field('pubdate') else '' fi
with this
Code:
if v = field('pubdate') then 'Published in ' & v  fi
Reasons:
  • Putting the assignment in the if condition avoids another call to field(), improving performance.
  • The else clause isn't needed because the if returns the empty string if the condition is false.

For the second template, for the bits that look like this:
Code:
if field('#li') then '​ ✍️ ' & field('#li') else '' fi,
replace them with this call to a user-defined template function:
Code:
do_field('#li', '​ ✍️ ')
To make this work you need to define the function. Put the following at the top of the template after the program: line.
Code:
	def do_field(field_name, icon):
		return (if v = field(field_name) then icon & v fi)
	fed;
Reasons:
  • The long list of conditions becomes much easier to read.
  • It saves editing if you want to change how an icon clause works.
  • The 'if' in the function uses the same technique as above for performance improvement.
chaley is offline   Reply With Quote
Old 01-24-2025, 05:24 PM   #784
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Thanks! I'm going to take a careful look at your recommendations later. Since you find that hard to read (it is, undoubtedly, but... that's how I managed to do the concatenations), I guess you'll find my "icons" column rule unimaginably chaotic:

Spoiler:
program:
def add_icon(icon, val):
if ! val then return icon fi;
if icon == '' then
icon = val
else
icon = icon & ':' & val
fi;
return icon
fed;

icon = '';

if 'EPUB' in $#f then icon = add_icon(icon, 'formats_epub.png') fi;
if 'AZW3' in $#f then icon = add_icon(icon, 'formats_azw3.png') fi;
if 'AZW2' in $#f then icon = add_icon(icon, 'formats_azw2.png') fi;
if 'BMP' in $#f then icon = add_icon(icon, 'formats_bmp.png') fi;
if 'CBR' in $#f then icon = add_icon(icon, 'formats_cbr.png') fi;
if 'CBZ' in $#f then icon = add_icon(icon, 'formats_cbz.png') fi;
if 'COMPUTER' in $#f then icon = add_icon(icon, 'formats_computer.png') fi;
if 'DIR' in $#f then icon = add_icon(icon, 'formats_dir.png') fi;
if 'DJVU' in $#f then icon = add_icon(icon, 'formats_djvu.png') fi;
if 'DOCX' in $#f then icon = add_icon(icon, 'formats_docx.png') fi;
if 'FB2' in $#f then icon = add_icon(icon, 'formats_fb2.png') fi;
if 'GIF' in $#f then icon = add_icon(icon, 'formats_gif.png') fi;
if 'HTML' in $#f then icon = add_icon(icon, 'formats_html.png') fi;
if 'JPEG' in $#f then icon = add_icon(icon, 'formats_jpeg.png') fi;
if 'KFX' in $#f then icon = add_icon(icon, 'formats_kfx.png') fi;
if 'LIT' in $#f then icon = add_icon(icon, 'formats_lit.png') fi;
if 'LRF' in $#f then icon = add_icon(icon, 'formats_lrf.png') fi;
if 'LRX' in $#f then icon = add_icon(icon, 'formats_lrx.png') fi;
if 'MOBI' in $#f then icon = add_icon(icon, 'formats_mobi.png') fi;
if 'ODF' in $#f then icon = add_icon(icon, 'formats_odf.png') fi;
if 'ODT' in $#f then icon = add_icon(icon, 'formats_odt.png') fi;
if 'OPML' in $#f then icon = add_icon(icon, 'formats_opml.png') fi;
if 'PNG' in $#f then icon = add_icon(icon, 'formats_png.png') fi;
if 'RAR' in $#f then icon = add_icon(icon, 'formats_rar.png') fi;
if 'RTF' in $#f then icon = add_icon(icon, 'formats_rtf.png') fi;
if 'SNB' in $#f then icon = add_icon(icon, 'formats_snb.png') fi;
if 'SVG' in $#f then icon = add_icon(icon, 'formats_svg.png') fi;
if 'TPZ' in $#f then icon = add_icon(icon, 'formats_tpz.png') fi;
if 'TXT' in $#f then icon = add_icon(icon, 'formats_txt.png') fi;
if 'UNKNOWN' in $#f then icon = add_icon(icon, 'formats_unknown.png') fi;
if 'XPS' in $#f then icon = add_icon(icon, 'formats_xps.png') fi;
if 'ZERO' in $#f then icon = add_icon(icon, 'formats_zero.png') fi;
if 'ZIP' in $#f then icon = add_icon(icon, 'formats_zip.png') fi;


if 'PDF' in $#f then
icon = add_icon(
icon,
if list_count($#f, ',') == 1
then 'formats_pdf_only.png'
else 'formats_pdf.png'
fi
)
fi;

if 'eng' in $languages then icon = add_icon(icon, 'lang-eng.png') fi;
if 'por' in $languages then icon = add_icon(icon, 'lang-port.png') fi;
if 'deu' in $languages then icon = add_icon(icon, 'lang-deu.png') fi;
if 'nl' in $languages then icon = add_icon(icon, 'lang-nl.png') fi;
if 'it' in $languages then icon = add_icon(icon, 'lang-it.png') fi;
if 'spa' in $languages then icon = add_icon(icon, 'lang-spa.png') fi;
if 'fra' in $languages then icon = add_icon(icon, 'lang-fra.png') fi;
if 'rus' in $languages then icon = add_icon(icon, 'lang-rus.png') fi;



if $comments != '' then
icon = add_icon(icon, 'has_comments.png')
fi;

if $#ac != '' then
icon = add_icon(icon, 'has_highlights.png')
fi;

if 'translated' in $tags then
icon = add_icon(
icon,
if list_count($#f, ',') == 1
then 'translate_icon.png'
fi
)
fi;

if $$#fav == 'true' then
icon = add_icon(icon, 'star.png')
fi;

if $$#rg_status == 'Reading' then icon = add_icon(icon, 'status_reading.png') fi;
if $$#rg_status == 'Read' then icon = add_icon(icon, 'status_read.png') fi;

return icon


Comfy.n is offline   Reply With Quote
Old 01-24-2025, 05:58 PM   #785
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,458
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Thanks! I'm going to take a careful look at your recommendations later. Since you find that hard to read (it is, undoubtedly, but... that's how I managed to do the concatenations), I guess you'll find my "icons" column rule unimaginably chaotic:
No, this one is easy. Things are on separate lines and the function is clear.

For performance reasons I would suggest the following small modification. Instead of lines like this:
Code:
if 'EPUB' in $#f then icon = add_icon(icon, 'formats_epub.png') fi;
if 'AZW3' in $#f then icon = add_icon(icon, 'formats_azw3.png') fi;
Do this:
Code:
f = $#f;
if 'EPUB' in f then icon = add_icon(icon, 'formats_epub.png') fi;
if 'AZW3' in f then icon = add_icon(icon, 'formats_azw3.png') fi;
This way you evaluate the field variable only once instead of on every if line.

If you would accept alphabetic order instead of your if statement order then this would replace the long block of ifs. It isn't any faster but it is much more concise.
Code:
	for f in $#f:
		icon = add_icon('formats_' & lowercase(f))
	rof
The same thing will work in the languages section below.
chaley is offline   Reply With Quote
Advert
Old 01-25-2025, 02:38 AM   #786
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post

For the second template, for the bits that look like this:
Code:
if field('#li') then '​ ✍️ ' & field('#li') else '' fi,
replace them with this call to a user-defined template function:
Code:
do_field('#li', '​ ✍️ ')
To make this work you need to define the function. Put the following at the top of the template after the program: line.
Code:
	def do_field(field_name, icon):
		return (if v = field(field_name) then icon & v fi)
	fed;
Reasons:
  • The long list of conditions becomes much easier to read.
  • It saves editing if you want to change how an icon clause works.
  • The 'if' in the function uses the same technique as above for performance improvement.
I liked this approach and now I have:

Code:
program: def do_field(field_name, icon, something, something2):
		return (if v = field(field_name) then icon & v  & something & something2 fi)
	fed;
out = '  💾 ';
fmts = list_sort(formats_sizes(), 0, ',') ;
for fmt_data in fmts:
fmt = sublist(fmt_data, 0, 1, ':');
size = sublist(fmt_data, 1, 2, ':');
str = if size ># 0 then strcat(fmt, ': ', human_readable(size), ' | ') else '' fi;
out=strcat(out, str)
rof;
if substr(out, -2, 0) == '| ' then
out = substr(out, 0, -3)
fi;
out

& strcat(
do_field('#li', '​ ✍️ '),
do_field('#fav', ' ⭐:'),
do_field('#pp', '​ 📈 ', ' pages') ,
do_field('#words', '​ 📈 ', ' words') ,
do_field('#ac', '​ 🟨 '),
do_field('#ot', '​ 🌱 '),
do_field('#tr', '​ 🌐'),
do_field('series', '​ ▶️ ', ' - ' , field('series_index'))
)
It was cool to figure out how to concatenate the pages, words and series info, by adding those extra 'somethings', though I suspect there's a simpler way. I've added #ot (original title) and #tr (translator) as I have populated the db with this info for some titles.
Comfy.n is offline   Reply With Quote
Old 01-25-2025, 04:36 AM   #787
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,458
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
It was cool to figure out how to concatenate the pages, words and series info, by adding those extra 'somethings', though I suspect there's a simpler way. I've added #ot (original title) and #tr (translator) as I have populated the db with this info for some titles.


I'll start sending template questions to you!

What you did with the 'somethings' is what I would have done. A reasonable alternative is a second function. The first wouldn't have the 'somethings' and the second would. The reason to do this is if the processing is different if the 'somethings' exist.
chaley is offline   Reply With Quote
Old 01-25-2025, 04:37 AM   #788
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post


I'll start sending template questions to you!
Comfy.n is offline   Reply With Quote
Old 01-25-2025, 06:27 PM   #789
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 897
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by Comfy.n View Post
I liked this approach and now I have:

Code:
program: def do_field(field_name, icon, something, something2):
		return (if v = field(field_name) then icon & v  & something & something2 fi)
	fed;
out = '  💾 ';
fmts = list_sort(formats_sizes(), 0, ',') ;
for fmt_data in fmts:
fmt = sublist(fmt_data, 0, 1, ':');
size = sublist(fmt_data, 1, 2, ':');
str = if size ># 0 then strcat(fmt, ': ', human_readable(size), ' | ') else '' fi;
out=strcat(out, str)
rof;
if substr(out, -2, 0) == '| ' then
out = substr(out, 0, -3)
fi;
out

& strcat(
do_field('#li', '​ ✍️ '),
do_field('#fav', ' ⭐:'),
do_field('#pp', '​ 📈 ', ' pages') ,
do_field('#words', '​ 📈 ', ' words') ,
do_field('#ac', '​ 🟨 '),
do_field('#ot', '​ 🌱 '),
do_field('#tr', '​ 🌐'),
do_field('series', '​ ▶️ ', ' - ' , field('series_index'))
)
It was cool to figure out how to concatenate the pages, words and series info, by adding those extra 'somethings', though I suspect there's a simpler way. I've added #ot (original title) and #tr (translator) as I have populated the db with this info for some titles.


Very good idea !!!
dunhill is offline   Reply With Quote
Old 01-26-2025, 05:38 AM   #790
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by dunhill View Post
Very good idea !!!
What I'm enjoying most is the possibility of having both my Comments/blurb custom column (which mirrors the built-in one) and the Author Bio displayed together.

It wouldn't make sense to me to use the Narrow interface layout by default until I found just recently that it's possible to display the output of templates in the comments section of book details.

Also, I had assigned two custom layouts called "down" and "right" when the Layout Actions feature was released and would need to alternate between them sometimes. Now I've settled down with BD on bottom of the UI and i'm very satisfied with it.

Comfy.n is offline   Reply With Quote
Old 01-26-2025, 12:08 PM   #791
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 897
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by Comfy.n View Post
@chaley: ​I went from this on my "Info" column displayed along with Comments field...

�� {title} by {author} �� {#abc_numeric} ��️ Published in {pubdate} by {publisher} �� {#pc} ��️ TS: {date} ��️ LA: {#la} ��️ LV: {#last_viewed} ISBN: {identifiers:select(isbn)} ��Votes: {#v} ��Rating: {#rr} �� {languages}

to this:

program:
out = '​�� ' & $title & ' by ' & $author & ' �� ' & $#abc_numeric & ' ��️' & if field('pubdate') then 'Published in ' & field('pubdate') else '' fi & if field('publisher') then ' by ' & field('publisher') else '' fi & ' �� ' & $#pc & ' ��️ TS: ' & $date & if field('#la') then ' ��️ LA: ' & field('#la') else '' fi & if field('#last_viewed') then ' ��️ LV: ' & field('#last_viewed') else '' fi & if select($identifiers, 'isbn') then ' �� ISBN: ' & select($identifiers, 'isbn') else '' fi & if field('#v') then ' ��Votes: ' & field('#v') else '' fi & if field('#rr') then ' ��Rating: ' & field('#rr') & if field('languages') then ' �� ' & field('languages') else '' fi else '' fi


WITHOUT AI... so my head is

The output in Book Details looks like this:

�� Nineteen eighty-four by George Orwell �� 91 ��️Published in August 2001 by Project Gutenberg of Australia �� 3 ��️ TS: 03-09-2024 05:49 ��️ LA: 22-Jan-2025 15:20 ��️ LV: 22-01-2025 15:20 �� ISBN: 9780241453513 ��Votes: 4800394 ��Rating: 4.19 �� eng

And I also have that other secondary Info column you helped me with the other day, like this:

program:
out = '  �� ';
fmts = list_sort(formats_sizes(), 0, ',') ;
for fmt_data in fmts:
fmt = sublist(fmt_data, 0, 1, ':');
size = sublist(fmt_data, 1, 2, ':');
str = if size ># 0 then strcat(fmt, ': ', human_readable(size), ' | ') else '' fi;
out=strcat(out, str)
rof;
if substr(out, -2, 0) == '| ' then
out = substr(out, 0, -3)
fi;
out

& strcat(
if field('#li') then '​ ✍️ ' & field('#li') else '' fi,
if field('#fav') then ' ⭐: y ' & field('') else '' fi,
if field('#pp') then '​ �� ' & field('#pp') & ' pages' else '' fi,
if field('#words') then '​ | ' & field('#words') & ' words' else '' fi,
if field('#ac') then '​ �� ' & field('#ac') else '' fi ,
if field('series') then '​ ▶️ ' & field('series') & ' - ' & field('series_index') else '' fi
)


this one outputs:

�� EPUB: 295.7 KB | ORIGINAL_PDF: 1.6 MB | PDF: 767.9 KB​ ✍️ https://www.goodreads.com/author/sho....George_Orwell ⭐: y ​ �� 484 pages​ | 103,810 words​ �� 16

I'm finding it fun to assemble these templates but I'd be happy to receive some feedback on overall syntax and alternatives to simplify the code or perhaps convert it to PTM

(the main purpose is to make room for my author Bio column but I also find those lines useful to spot at a glance what metadata is missing that I would like to have displayed)

Implemented, thanks

Last edited by dunhill; 01-26-2025 at 12:58 PM.
dunhill is offline   Reply With Quote
Old 01-26-2025, 12:56 PM   #792
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by dunhill View Post
Where do the templates go?
I know it's a modification of the next version but those who have the source code version could post a screenshot of where the template for the category icons or this template would go.
Thanks
Actually what I'm using is available since 2023, I mean, the Custom Column/ Book Details feature that allows templates along with the Comments column:

Click image for larger version

Name:	2025-01-26 14_46_56-Edit custom column.png
Views:	145
Size:	19.4 KB
ID:	213282
Click image for larger version

Name:	2025-01-26 14_44_20-Edit custom column.png
Views:	158
Size:	22.6 KB
ID:	213283
Click image for larger version

Name:	2025-01-26 14_43_57-Edit custom column.png
Views:	155
Size:	23.4 KB
ID:	213284
Click image for larger version

Name:	MWSnap 2025-01-26, 14_34_49.png
Views:	148
Size:	7.9 KB
ID:	213285


As to the new Category custom icons for the Tag Browser, this feature is already available on latest preview
Comfy.n is offline   Reply With Quote
Old 01-26-2025, 01:52 PM   #793
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Hey Comfy.n, can you still navigate in Calibre or can you make yourself a coffee after every change?

That's why I've stopped listing everything down to the author's shoe size.

But if the madness should take hold of me again, I'll still be happy to help myself here - thank you.
Wiggo is offline   Reply With Quote
Old 01-26-2025, 02:05 PM   #794
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: 21,779
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Comfy.n View Post
Also, I had assigned two custom layouts called "down" and "right" when the Layout Actions feature was released and would need to alternate between them sometimes. Now I've settled down with BD on bottom of the UI and i'm very satisfied with it.
FYI - the same result can be achieved with this:

Click image for larger version

Name:	Screenshot 2025-01-27 054710.jpg
Views:	277
Size:	218.8 KB
ID:	213286

Those key sequences are my assignments.

BR
BetterRed is offline   Reply With Quote
Old 01-26-2025, 07:29 PM   #795
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by Wiggo View Post
Hey Comfy.n, can you still navigate in Calibre or can you make yourself a coffee after every change?

That's why I've stopped listing everything down to the author's shoe size.

But if the madness should take hold of me again, I'll still be happy to help myself here - thank you.
Yup, I admit to be kind of obsessed about having lots of info displayed all at once, though it's sometimes overwhelming.

Quote:
Originally Posted by BetterRed View Post
FYI - the same result can be achieved with this:

Attachment 213286

Those key sequences are my assignments.

BR
And... that's just another action whose existence I totally missed.
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library Management: various questions not worth their own thread ownedbycats Library Management 227 Yesterday 05:28 PM
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates Boilerplate4U Development 13 07-07-2020 02:35 AM
Questions on Kobo [Interfered with another thread topic] spdavies Kobo Reader 8 10-12-2014 11:37 AM
[OLD Thread] Some questions before buying the fire. darthreader13 Kindle Fire 7 05-10-2013 09:19 PM
Thread management questions meme Feedback 6 01-31-2011 05:07 PM


All times are GMT -4. The time now is 06:33 AM.


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