![]() |
#16 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,995
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I found the space and removed it. Still getting the error.
I asked in the Kobo Touch Extended thread whether it could be a bug in the driver. |
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Depending on how much time you are willing to spend now that you have a composite column "solution" ...
It looks like parsing the template passed by the kobo driver is failing, perhaps because of line endings or character set issues. One possible solution is to simplify that template. You can do that by making the original template into a "stored template" then calling that template from one in the kobo driver. Steps: 1) Make a stored template (preferences / Stored templates) containing Code:
program: if field('#readorder') then template('Reading List: {#readorder} #{#readorder_index:0>2s}') else if field('#fanficcat') then template('{#fanficcat}') fi fi 2) Change the template in the driver to Code:
program: subtitle() |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
![]()
Also, the template can be rewritten as
Code:
program: if field('#readorder') then template('Reading List: {#readorder} #{#readorder_index:0>2s}') elif field('#fanficcat') then template('{#fanficcat}') fi |
![]() |
![]() |
![]() |
#19 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,995
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I got it fixed. It was user error of a sort.
The template was valid. I made a mistake (forgot a fi or misplaced it or something) and fixed it, but the driver didn't overwrite the errored subtitle with the blank one. I deleted the template to force the driver to delete all the subtitles, put the template back, and it worked. Sorry. Last edited by ownedbycats; 12-02-2020 at 02:32 PM. |
![]() |
![]() |
![]() |
#20 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
pb = [(self.subtitle_template, 'subtitle')] book.template_to_attribute(book, pb) new_subtitle = book.subtitle The "book" is basically a Metadata object with some Kobo specific attributes. It will be the Book defined in from devices/kobo/books.py. @ownedbycats: The subtitle should have been updated after fixing the template. It has been when I have used it. And I think that was one of my tests when I did this. I don't use the subtitle myself, but, I'll test it sometime soon. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple regexes in "save book to disk" template? | Phssthpok | Library Management | 1 | 07-12-2018 04:20 AM |
"Add a book" template like "Save to disk"? | vr8ce | Library Management | 10 | 06-09-2017 08:16 AM |
Kindle newbie needs "template" HTML & CSS | Rich_H | Kindle Developer's Corner | 12 | 09-10-2012 11:16 PM |
Kindle Newbie needs "template" HTML & CSS | Rich_H | Workshop | 4 | 09-10-2012 08:33 PM |
Kindle DX optimal "page" size - PDF or Word template | guiyoforward | Amazon Kindle | 12 | 09-28-2010 07:05 PM |