![]() |
#901 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you!
|
![]() |
![]() |
![]() |
#902 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Question: I'm converting my fanfic column icon rules to a single advanced rule.
Code:
program: f = field('#fanficcat'); strcat ( contains(f, "Dragon Age: Origins", 'dragonageorigins.png', ''), contains(f, "Half-Life", 'halflife.png', ''), contains(f, "Mass Effect", 'masseffect.png', ''), contains(f, "The Elder Scrolls", 'theelderscrolls.png', ''), contains(f, "Pokémon", 'pokemon.png', ''), contains(f, "Portal", 'portal.png', ''), ) What should I do? Last edited by ownedbycats; 12-12-2020 at 05:42 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#903 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Adding a colon to the end of each filename (e.g. halflife.png:) worked. I'm not sure if that's the proper solution though.
|
![]() |
![]() |
![]() |
#904 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,345
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
That said, checking the code I note that an empty icon file name, as in your example, isn't handled very efficiently. I will fix that. |
|
![]() |
![]() |
![]() |
#905 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#906 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For fanfiction readers who read on Kobo:
If you have FanFicFare set up with both a Fandom and Status column (or just do it manually), putting this into the Subtitle template (Customize KoboTouchExtended > Metadata, on device & advanced tab) will display the info as a subtitle on Kobo. ![]() Code:
program: if field('#yourfandomcolumn') then template('{#yourfandomcolumn} | {#yourstatuscolumn}') fi Code:
program: if field('#yourfandomcolumn') then template('{#yourfandomcolumn:sublist(0,1,\,)} | {#yourstatuscolumn}') fi Last edited by ownedbycats; 01-16-2021 at 09:03 PM. |
![]() |
![]() |
![]() |
#907 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
If you have columns for them, putting this in the template tester will let you see the average number of pages per chapter.
Code:
program: chapters = $$#chaptercount; pages = $$#pagecount; if chapters>#0 then divide(pages, chapters) fi |
![]() |
![]() |
![]() |
#908 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 871
Karma: 409968
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
Hi, someone still uses the thread settings
https://www.mobileread.com/forums/sh...&postcount=137 https://www.mobileread.com/forums/sh...&postcount=172 Rereading the previous post you will find beautiful jewels but for some reason they have stopped working. I leave you a screenshot, in case the one who made the mistake is the one between the chair and the keyboard. Thank you very much as always. |
![]() |
![]() |
![]() |
#909 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,345
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Try following the instructions *exactly* from one or the other of the posts, including setting the number of arguments box to the correct value. |
|
![]() |
![]() |
![]() |
#910 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 871
Karma: 409968
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
Quote:
|
|
![]() |
![]() |
![]() |
#911 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 871
Karma: 409968
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
Quote:
It is possible that the template could recognize more than one format ? program:cmp(count(template('[[format]]'), ','), 1, 'no', in_list(template('[[format]]'), ',', 'Ogg', 'Si', 'no', ',', 'M3u', 'Si', 'no', ',', 'M4a', 'Si', 'no', ',', 'Mp3', 'Si', 'no'), 'no') Last edited by dunhill; 08-31-2021 at 06:39 PM. |
|
![]() |
![]() |
![]() |
#912 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,187
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
|
![]() |
![]() |
![]() |
#913 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 871
Karma: 409968
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
|
![]() |
![]() |
![]() |
#914 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,642
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#915 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,726
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For those who read fanfics on a Kobo, here's something you can put in a composite column to show how many chapters you've read of a fic as of the last time you connected the device. Note that this relies on using Kobo Utilities and FanFicFare; read the comments for more details.
Code:
program: # 'Current reading location' stored by Kobo Utilities. input = $#kobobookmark; # These last three are saved by FanFicFare. fandom = $#fanficcat; status = $#fanficstatus; ccount = $$#chaptercount; if fandom then if # Note that this is FanFicFare's file structure. If you download with a different tool, it may not work. substr(input, 0, 10) == 'OEBPS/file' && # Anthologies have a different file structure, so we should ignore those. !status inlist 'Anthology' then # Since I pause at the beginning of chapters, I subtract by one. strcat(format_number(re(input, '.*\/file(\d+).*', '\1') - 1, '{0:,d}'), '/',ccount) else # Showing a regular chapter count for everything else. ccount fi fi ![]() Last edited by ownedbycats; 10-20-2021 at 12:58 AM. |
![]() |
![]() |
![]() |
Tags |
custom column, tag, tags |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |