![]() |
#1 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,972
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Template tester: "can be used only in the GUI"?
If I go to Add Books > open the settings for a composite column > right-click 'template' to open the editor and put in:
Quote:
Code:
EXCEPTION: The function virtual_libraries can be used only in the GUI |
|
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,972
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
- Right-click column header
- Open 'Add your own column' (This was a typo ![]() - Find a composite column - Double-click to open the dialog - Right-click the template field and open the editor - Add the code there |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Sorry, but it doesn't fail for me.
Running current source, I tried:
I then restart calibre. Again, fine, no error message. What are you doing different from the above? |
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,972
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I pulled the latest source (most recent commit: 3c5b4bf) before starting again.
The only difference is that the column I was testing with (taglike) already contained virtual_libraries(). I tried adding it to a different column (not taglike) and it still error'd. I thought perhaps it was because I'd accidentally de-selected all the books but I tried selecting 3 and still got the same message. Last edited by ownedbycats; 10-24-2022 at 04:59 PM. |
![]() |
![]() |
![]() |
#6 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Could it have anything to do with this transient glitch?
It happens when I start calibre in the Test library or switch to it. As soon I select another book the problem goes away, i.e. VL Vanilla show same content as VL Taglike except its white non-clickable text. Screenshots of VL Vanilla column and temp VL definitions attached. @chaley - I can PM you the Test library database if you're interested, I don't regard this as a bug because it's not a real world scenario. Win 10, Calibre 6.7.1 BR PS : I did a database restore - glitch persists Last edited by BetterRed; 10-24-2022 at 05:30 PM. Reason: PS added |
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Yes, this is technical but I don't know how to better describe detecting directed cyclical graphs. ![]() |
|
![]() |
![]() |
![]() |
#8 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,972
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I occasionally get the recursion glitch too, mostly on Read|Unread when starting up -- I'm not sure if there's something wrong with those or whether they're just the first evaluated.
Here's the searches I use for my VLs -- I don't think there's any missing column keys and nothing references virtual_libraries() - I think the only composite referenced is #onkobo, which returns yes/no based on the value of an enumerated column. Note: readstatus() is a custom template that returns values based on two columns (#percentread and #readinglist). Currently Reading: template:"program:readstatus()#@#:t:~(currentlyrea ding|toberead)" Read: template:"program:readstatus()#@#:t:=read" Unread: template:"program:readstatus()#@#:t:=unread" Fiction: #booktype:"=Fiction" Fanfiction: #booktype:"=Fanfiction" Nonfiction: #booktype:"=Nonfiction" Comics: #booktype:"=Comics" Documentation & Manuals: #booktype:"=Documentations & Manuals" Magazines & Periodicals: #booktype:"=Magazines & Periodicals" Series: series:true AND NOT #booktype:"~(fanfiction|documentation|magazines)" Loans: search:"=Is library book" (saved search: (formats:#=1) AND (formats:overdrive)) eBooks: search:"=Has eBook" AND NOT #booktype:"~(fanfiction|documentation)" (saved search: NOT formats:"~(overdrive|paperbook)" OR NOT formats:#=1) Physical Books: formats:paperbook On Device: search:"=On Device" (saved search: ondevice:true OR #onkobo:true) Cleanup:tags:"=[Cleanup]" Last edited by ownedbycats; 10-24-2022 at 06:25 PM. Reason: had to disable smilies... |
![]() |
![]() |
![]() |
#9 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template: saving template tester when restarting Calibre | ownedbycats | Library Management | 14 | 03-29-2021 05:57 PM |
"Normal" template inside GPM template | ownedbycats | Library Management | 20 | 12-02-2020 09:40 PM |
"Add a book" template like "Save to disk"? | vr8ce | Library Management | 10 | 06-09-2017 08:16 AM |
Two suggestions for Template Tester | PeterT | Calibre | 3 | 09-08-2014 06:04 AM |
Kindle DX optimal "page" size - PDF or Word template | guiyoforward | Amazon Kindle | 12 | 09-28-2010 07:05 PM |