![]() |
#31 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Also this: https://en.wikipedia.org/wiki/Time_f...26,596_problem
Quote:
![]() |
|
![]() |
![]() |
![]() |
#32 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,840
Karma: 27620684
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#33 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#34 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
As I said on the report, I will highlight identifiers. Currently (in development) it looks like this. |
|
![]() |
![]() |
![]() |
#35 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
29 Mar 2021 (in calibre source)
You can see both in this screen capture Last edited by chaley; 03-29-2021 at 01:12 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
The italics on the $lookupkey in source work.
![]() |
![]() |
![]() |
![]() |
#37 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Let me know if you can, or can't, figure out how to use the new breakpoints.
One problem: given how the template processor works internally there is a problem matching a line number to a particular 'thing'. I had to make 'if' statements work differently because it was difficult to put a breakpoint in the "else" clause (for example). Function calls split across multiple lines also are problematic. "Fixing" this is hard because during template execution line numbers are approximate. It seems that after more than 40 years of developing programming languages I would be able to do this without thinking. But I don't. Sigh ... |
![]() |
![]() |
![]() |
#38 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I am taking some of my existing templates and trying to figure it out. One thing I notice is that the breakpoints are not saved after pressing OK to save the template and close the tester. Is that intended?
|
![]() |
![]() |
![]() |
#39 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Yes, it can make sense to try it on another book, but there is a "secret" feature to help with that. Select all the books you want to test, then open the tester. If you click on a book in the results list before clicking "Go" then that book will be used during breakpoint evaluation. |
|
![]() |
![]() |
![]() |
#40 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I was testing it on the template I was having trouble with here (the one with the dates in the wrong order). I thought days_between would show up on the dialog. Did I misunderstand this?
|
![]() |
![]() |
![]() |
#41 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
The issue I had with that template is probably what I would find breakpoints useful for, to make sure that when checking a value it actually is what I intended to check for (730 days instead of -730 days).
![]() |
![]() |
![]() |
![]() |
#42 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#43 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Yes, it should make it easier to debug for all of us. I appreciate all the efforts chaley has put into this. Templates have made huge strides lately.
![]() |
![]() |
![]() |
![]() |
#44 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,192
Karma: 63194629
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I see the same results if I set the breakpoint to #6. Hmm.
If you want to test the code itself with your own columns to see if you can make it appear, #fanficstatus is enumerated, #fanficupdated is date, and #fanficerror can probably be any column as it only checks if it's defined. Last edited by ownedbycats; 03-29-2021 at 07:52 PM. |
![]() |
![]() |
![]() |
#45 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,908
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() Several changes:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |