07-18-2013, 09:26 AM | #1 |
Belgian Pommes Frites
Posts: 101
Karma: 532
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
change the length of the pathname when sending to device
I use an Iriver HD Story ebook reader. The maximum length of the pathname and the epub name combined, on the ebook reader, may not exceed 200 characters, otherwise the epub will not open on the ebook reader.
However, I have some ebooks that have lots of authors (collections of stories by a number of authors), and hence makes for a pathname on the ebook reader that is really long - way beyond 200 characters. Hence I have been experimenting in the preferences ->import/export->sending to devices with the template to save the epub to the device. I have tried: {author_sort: sublist (0, 4, &)}/{title} - {series_index} {series} and {author_sort: shorten (80, -, 20)}/{title} - {series_index} {series} but it does not change the length of the pathname at all. I have searched the calibre forum for info, because it is the first time I try to change this template and my understanding is still very basic, but I did not find anything. Is my syntax wrong? Or am I doing something else wrong? Or is there a far easier way to accomplish the same? Any pointers or info would be much appreciated? Many thanks, |
07-18-2013, 09:57 AM | #2 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
There are two templates involved. The one in preferences is used the first time you connect to a device. After that, the one associated with the device wins.
Connect the device, right-click on the device button, choose configure, then change the template in that dialog. |
Advert | |
|
07-19-2013, 07:48 AM | #3 |
Belgian Pommes Frites
Posts: 101
Karma: 532
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Hi Chaley,
Thanks for that tip. I did not know it worked in that sequence. I changed the config of the device to: {author_sort: shorten (80, -, 20)}/{title} - {series_index} {series} and then I tried. What I found on the device, was a folder named "shorten_unknown function" with the epub file inside this folder. So, it looks like the function "shorten" is not recognized or not valid for the parameter author_sort. When I look at the help file http://manual.calibre-ebook.com/template_lang.html, to me, it looks like it should work. Or is my understanding still too limited? Or a bug or...? Many thanks for any further info, Capricorn |
07-19-2013, 07:59 AM | #4 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Remove the space and it should work. Also note that the spaces around the minus are significant -- they will be in the output. |
|
07-20-2013, 01:11 AM | #5 |
Belgian Pommes Frites
Posts: 101
Karma: 532
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Hi Chaley,
Thank you very much for posting, as I would NOT have thought of those blanks as the problem. I first tried this syntax: {author_sort: shorten(80,-,20)}/{title} - {series_index} {series} but it still gave a folder with the name "shorten_unknown function". Then I tried the syntax: {author_sort:shorten(80,-,20)}/{title} - {series_index} {series} and lo and behold. It worked as I wanted it to. The epub file now opens on my reader. Simply brilliant. Thank you very much for helping me out. Capricorn |
Advert | |
|
07-20-2013, 02:51 AM | #6 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
Tags |
length, send to device, syntax, template |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem seeing/sending to device | jans52 | Devices | 3 | 09-15-2011 01:49 PM |
Sending Ebooks to Device. | ErikaGC | Devices | 1 | 08-11-2011 04:40 PM |
Sending magazines to Device | mitch13 | Library Management | 1 | 04-04-2011 10:17 AM |
Sending E-Books to Device | Lady Fitzgerald | Calibre | 3 | 05-16-2010 03:43 PM |