![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,408
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Changes to template function documentation processing
For the past many years we have had 2 and sometimes 3 simultaneous different versions of documentation for template functions. These versions weren't kept in sync. Some versions were wrong. The multiple versions created extra work for translators. In addition, the version visible in the template tester was unformatted so complex documentation such as for format_date() was hard to read.
We have now completed the changes so that:
![]() The documentation on the web won't be updated until the next calibre release (not preview). Translators and documentation editors: The documentation uses an invented markup language "Formatter Function Markup Language" (FFML), a subset of BBCODE (used by MobileRead) and RST (sphinx web documentation). Both HTML and RST can be generated from FFML. It is documented in the FFML processing code (calibre.utils.ffml_processor.py), and inside calibre by pushing the (new) "General Information" button in the template tester. A simple editor/viewer is available in calibre for documentation either while editing or translating. There is no requirement to use it, but doing so might help avoid formatting errors. This viewer/editor is available in two ways:
|
![]() |
![]() |
![]() |
#2 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,609
Karma: 7891011
Join Date: Sep 2020
Device: none
|
Is it possible to save a documentation "note" for a stored template such as "books with notes containing text"?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,408
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
EDIT: Or perhaps you entered it but it isn't being saved? If this is the problem then press the Replace button. |
|
![]() |
![]() |
![]() |
#4 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,609
Karma: 7891011
Join Date: Sep 2020
Device: none
|
|
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,892
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I now wonder if, in the future, there might be a way to export specific stored templates/functions and their documentation for other users to import (similar to Action Chains). Likely limited in its usefulness admittedly.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,408
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I've wondered about that. It would be useful for the recipes, especially now that the template's documentation is available and can be formatted. I'll look at it at some point.
|
![]() |
![]() |
![]() |
#7 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,609
Karma: 7891011
Join Date: Sep 2020
Device: none
|
On a quite unrelated note, I've recently wondered about a common repository for author notes...
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template function to strip HTML? | halloleo | Library Management | 6 | 11-16-2023 03:20 AM |
ePub version in template function? | tamaracks | Library Management | 8 | 06-17-2023 07:54 PM |
Short title template function | TreeFrogBandit | Library Management | 2 | 06-11-2022 05:37 AM |
Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 12:20 PM |
Problem with contains function in save template | MicaOlaAdams | Calibre | 5 | 10-21-2016 10:25 AM |