Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2020, 02:04 PM   #16
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,998
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.
ownedbycats is online now   Reply With Quote
Old 12-02-2020, 02:24 PM   #17
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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
Name it whatever you want, for example subtitle.

2) Change the template in the driver to
Code:
program: subtitle()
chaley is offline   Reply With Quote
Old 12-02-2020, 02:25 PM   #18
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thumbs up

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
I don't know if that will help.
chaley is offline   Reply With Quote
Old 12-02-2020, 02:25 PM   #19
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,998
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.
ownedbycats is online now   Reply With Quote
Old 12-02-2020, 02:36 PM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
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.
Whew. Thanks for telling me. I was worried that something extremely basic was broken.
chaley is offline   Reply With Quote
Old 12-02-2020, 09:40 PM   #21
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by chaley View Post
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.
For the record, the driver uses the subtitle template with:

Code:
                    pb = [(self.subtitle_template, 'subtitle')]
                    book.template_to_attribute(book, pb)
                    new_subtitle = book.subtitle
That is devices/kobo/driver.py line 3243. And the KoboTouchExtended driver subclasses the KoboTouch driver and doesn't override anything related to this.

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.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:55 PM.


MobileRead.com is a privately owned, operated and funded community.