Kovid Goyal
69eac37671
Fix incorrect docs for date_arithmetic()
2021-06-04 05:01:30 +05:30
Charles Haley
e03405df1b
New formatter function 'date_arithmetic' that simplifies computing new dates from an existing one
2021-06-03 15:31:55 +01:00
Kovid Goyal
f4bfb45601
String changes
2021-05-03 13:47:46 +05:30
Charles Haley
7d3c0b5b05
More template stuff:
...
- Replace the newline() function with the character('name') function
- Document the new function
- In the template editor/debugger, display special characters like newline as escaped characters
2021-04-21 16:44:16 +01:00
Charles Haley
8228daab7b
Template language enhancement: add the 'inlist' operator
2021-04-15 14:56:16 +01:00
Charles Haley
0999e9726f
Template documentation updates
2021-04-06 15:25:09 +01:00
Kovid Goyal
3848fb45d0
String changes
2021-03-27 20:39:10 +05:30
Charles Haley
1311c84d11
Template function format_date() improvement: add 'to_number' and 'from_number' as valid formats
2021-03-25 19:31:12 +00:00
Charles Haley
7e95562329
Fix Jellby's second example.
2021-03-25 13:13:07 +00:00
Charles Haley
c2a25a8bd1
Bug #1921348 : English text in code block. Many other cleanup, spelling, and grammar changes.
2021-03-25 13:05:02 +00:00
Charles Haley
b173eb4636
Add field references to the language syntax. $authors is the same as field('authors'). $$pubdate is the same as raw_field('pubdate').
2021-03-24 12:49:49 +00:00
Charles Haley
4b67f7cc1d
Template language manual improvements.
2021-03-15 13:24:41 +00:00
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