Update kobo.py to include subtitle if field exists in custom columns#3358
Update kobo.py to include subtitle if field exists in custom columns#3358dotknott wants to merge 1 commit intojaneczku:masterfrom
Conversation
|
In my particular case, I wanted the subtitle field to show the number of pages as, e.g., "256 pages". This solution seems to only like columns with plain text or numbers. I made the #subtitle column be populated with integers from Count Words and it worked, however it only outputed "256", which was only half my desired end goal. I tried making a new #subtitle column, having it referencing the number column and with the template {#pages:} pages. The output of the column was indeed "256 pages", but sync would fail allways. It seems it doesn't like templates. However, I found a solution. Going back to making the #subtitle column be the one populated by Count Pages and changing line 440 to |
Since Subtitle is becoming more common in Calibre DB setups with Kobo users, I added subtitle to the sync data when there's a custom column labeled 'subtitle'. When no matching column exists it returns an empty string.