|
|
#91 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
|
|
|
|
|
#92 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
switch() function performance / compound icons
23 July 2022 (in calibre 6.2.1):
Last edited by chaley; 08-01-2022 at 11:23 AM. |
|
|
|
|
|
#93 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
New function strcmpcase
14 Sept 2022 (in calibre 6.5.0)
Last edited by chaley; 09-16-2022 at 11:12 AM. |
|
|
|
|
|
#94 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
New template function to_hex()
16 Sept 2022 (in calibre 6.5.0)
|
|
|
|
|
|
#95 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
New Python Template Mode
12 Oct 2022 (in calibre 6.7.0)
Last edited by chaley; 11-01-2022 at 10:06 AM. |
|
|
|
|
|
#96 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
29 Oct 2022 (in calibre 6.8.0)
Last edited by chaley; 11-15-2022 at 01:23 PM. |
|
|
|
|
|
#97 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
15 Nov 2022 (in calibre 6.9.0)
Last edited by chaley; 12-29-2022 at 03:14 PM. |
|
|
|
|
|
#98 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
06 Jan 2023 (in calibre 6.12):
Last edited by chaley; 02-23-2023 at 10:53 AM. |
|
|
|
|
|
#99 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
08 Apr 2023 (in calibre 6.15)
|
|
|
|
|
|
#100 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
New extra book data functions
24 Apr 2023 (in calibre 6.17)
New template functions:
Last edited by chaley; 04-27-2023 at 10:50 AM. |
|
|
|
|
|
#101 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,005
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I want to show an icon if the data folder contains a file named todo.???? (might be ToDo.txt, TODO.EML, todo.stky, etc).
Something like extra_file_exists("todo.*") might be useful. BR |
|
|
|
|
|
#102 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program:
files = extra_file_names(':');
in_list(files, ':', 'todo\..*', 'Yes', '')
Last edited by chaley; 04-27-2023 at 06:40 AM. |
|
|
|
|
|
|
#103 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,329
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Would it make sense to include an explicit extra_file_count()? I think its currently possible with existing list functions (forgot exactly).
|
|
|
|
|
|
#104 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program:
list_count(extra_file_names(':'), ':')
Code:
python: def evaluate(book, context): from calibre.gui2.ui import get_gui extra_files = get_gui().current_db.new_api.list_extra_files(book.id, use_cache=True) return str(len(extra_files)) if extra_files else '' Last edited by chaley; 04-27-2023 at 08:08 AM. |
|
|
|
|
|
|
#105 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
To get "Yes" with the changed version you would do Code:
program: if has_extra_files() then 'Yes' fi |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A few questions... (template language, mainly) | Clem2605 | Library Management | 2 | 12-30-2020 03:25 AM |
| Template Language | phossler | Calibre | 8 | 01-12-2016 04:37 PM |
| Help needed with template language | Mamaijee | Devices | 12 | 02-19-2013 01:52 AM |
| Help with template language | Pepin33 | Calibre | 8 | 11-11-2012 08:32 AM |
| Template language question | BookJunkieLI | Library Management | 7 | 02-02-2012 06:55 PM |