Charles Haley
9b4df77da5
More template language documentation improvements.
2021-03-08 15:16:13 +00:00
Kovid Goyal
54c56b9d0e
String changes
2021-03-08 17:08:16 +05:30
Charles Haley
bde8cd5e65
1) Fix regression in template language: at some point in V5 the template language was changed to disallow using an expression_list as a parameter. This was allowed in previous major revisions.
...
2) Allow expression lists in parameterized expressions.
3) Correct the grammar in the documentation.
2021-03-07 11:01:50 +00:00
Kovid Goyal
661d5a5278
String changes
2021-03-06 19:54:17 +05:30
Kovid Goyal
c854a7b670
string changes
2021-03-05 22:18:23 +05:30
Charles Haley
5531796d40
Improvements to the template documentation
2021-03-05 14:38:57 +00:00
Kovid Goyal
f7d80b53e6
string changes
2021-03-05 17:03:59 +05:30
Charles Haley
13732b15d8
Rewrite much of the template language manual document.
...
The commit on 27 Feb isn't good. The manual page should be regenerated from this commit.
2021-02-28 16:13:55 +00:00
Kovid Goyal
a0564ea47d
Fix sphinx warnings
2021-02-28 13:13:25 +05:30
Charles Haley
ac9c9d6ab5
Various improvements:
...
1) Changes to the template program language discussed in https://www.mobileread.com/forums/showthread.php?t=337668
2) General improvement of the template documentation, including documentation of the above changes. I looked at the changes using a markdown interpreter, but there might be problems exposed by generation of the web page.
3) Focus the program text box when opening the template dialog
4) Small changes to non-built-in template functions to improve performance
2021-02-27 14:20:10 +00:00
Charles Haley
7a18631b8f
Improvement to template function raw_field: an optional second argument providing the default if the field is None.
2021-02-25 16:04:56 +00:00
Kovid Goyal
36ffc2b3cf
String changes
2021-02-25 12:20:57 +05:30
Kovid Goyal
d5cb3aa7c0
String changes
2021-02-25 07:28:16 +05:30
Charles Haley
a3c8793c6a
Template language improvements:
...
1) added the infix compare operator 'in'. Usage: pattern in expression.
2) added the template function list_count_matching()
3) documentation for the above.
2021-02-23 10:14:20 +00:00
Charles Haley
a12165e01b
Template language changes:
...
1) add the possibility to specify a separator in a for statement.
2) add the template function list_remove_duplicates()
2021-02-22 11:43:19 +00:00
Charles Haley
8fbb8df75c
Add a new template function set_globals() that sets key:value pairs in the globals dict. Also slightly improve template language documentation.
2021-02-18 16:03:45 +00:00
Charles Haley
1af28bd3ba
Add template function 'is_marked()'
2021-02-17 14:43:42 +00:00
Charles Haley
fb2f184958
Two changes:
...
1) Add the alias "list_contains" to the "in_list" function so that naming is more consistent.
2) Add composite categories to valid grouped searches.
2021-02-13 13:08:27 +00:00
Charles Haley
cfbff3d98f
New template function: field_exists()
2021-01-17 13:56:55 +00:00
Charles Haley
b7c4fcd711
Enhancement: allow template functions add() and multiply() to take a variable number of arguments.
2021-01-17 13:56:28 +00:00
Kovid Goyal
d457997830
String changes
2021-01-06 14:08:10 +05:30
Kovid Goyal
a30d4be28d
Merge branch 'patch-1' of https://github.com/madphysicist/calibre
2021-01-06 08:34:05 +05:30
Joseph Fox-Rabinovitz
8da7110fc8
Punctuation, wrapping
2021-01-05 15:55:18 -06:00
Charles Haley
746ae8e37a
Add new template function list_split. Fix python 3 imcompatibility getting source code from the built-in functions class.
2021-01-03 11:13:59 +00:00
Kovid Goyal
1e123e35cf
manual formatting
2020-12-24 09:58:26 +05:30
Charles Haley
da52fa1655
Template language: add function connected_device_uuid
2020-12-22 14:44:17 +00:00
Charles Haley
dff123fc0f
Template/formatter enhancements:
...
1) Added a 'for' statement
2) Added the ability for a developer to pass a dict of extra information to a template.
2020-12-19 09:46:41 +00:00
Charles Haley
38055729c8
Fix bug 1900316: Rewrite example in documentation for translations.
2020-10-18 12:27:31 +01:00
Kovid Goyal
8849f5adec
String changes
2020-10-17 13:45:23 +05:30
Charles Haley
794ed146af
Minor cleanups of the template documentation
2020-10-16 08:42:01 +01:00
Kovid Goyal
ebf3937628
...
2020-10-16 07:34:00 +05:30
Charles Haley
3b096ca3ff
Updates and cleanups of the template documentation.
...
I don't know if I got the formatting right. In particular I moved the function reference to the end, which I hope doesn't break anything.
2020-10-15 18:55:04 +01:00
Charles Haley
47de6e084d
Enhancement: add 'elif' to the formatter if expression
2020-10-12 12:08:23 +01:00
Kovid Goyal
216c5a3629
String changes
2020-10-08 09:58:26 +05:30
Kovid Goyal
2395bc85a8
String changes
2020-10-03 18:36:12 +05:30
Kovid Goyal
bc34075d05
String changes
2020-10-03 15:26:32 +05:30
Kovid Goyal
2d9ac6aa54
Basic cleanups for the python template function merge
2020-10-03 09:18:18 +05:30
Charles Haley
1c56c41b80
Fix the manual
2020-10-02 08:11:51 +01:00
Charles Haley
f839ac96e3
Stored templates
2020-10-01 09:41:18 +01:00
Charles Haley
40a77e05d8
...
2020-09-28 14:19:09 +01:00
Charles Haley
d4798a11e5
Update the manual
2020-09-28 13:59:24 +01:00
Charles Haley
951f1199c8
Add a new formatter function 'connected_device_name'
2020-09-21 22:25:13 +01:00
Kovid Goyal
d0d0bdd998
Fix warnings from sphinx and gettext
2020-09-20 09:15:50 +05:30
Charles Haley
fb9a388c08
Unreported bug: the V4 template language treated None values as zero. These changes make the new processor do the same thing. Also update the documentation,
2020-09-14 00:59:38 +01:00
Charles Haley
7086be4fe2
Update template documentation
2020-09-06 13:07:15 +01:00
Charles Haley
6e4dada20c
Enhancement: add some math functions to the template language: ceiling, floor, fractional_part, mod, and round.
2020-07-31 12:57:13 +01:00
Charles Haley
7cd342f3a2
Enhancement 1885943: Ignore articles when sorting custom columns. Implemented by a new formatter function, swap_around_articles(), that applies title_sort to each item in the list.
2020-07-02 11:48:59 +01:00
Charles Haley
6aa5a51e3b
Fix some incorrectly indented sections in the manual by changing some tabs to spaces.
2020-06-25 09:44:26 +01:00
Kovid Goyal
9ba6848530
Remove version spec from python docs links
2020-06-21 14:07:42 +05:30
Charles Haley
222599e870
Add a new template function "rating_to_stars"
2020-06-20 17:12:26 +01:00