|
|
#1 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Pocketbook 634
|
Hi
I wan to save export my books with rules. If they are in series and from one author to author/series/series_series_index-title-authors.epub If they are in series and have multiple authors to series/series_series_index-title-authors.epub If is normal to author/title-authors.epub I tried use calibre template language but id didnt work as i want. Code:
{program:
def autors_in_series(name):
ret = 1;
all_books=book_values('authors', 'series:'&name, ',', 0);
author = list_item(all_books, 0, ',');
for book in all_books:
if author != book then
ret = 0
fi
rof;
return ret
fed;
serie = field('series');
if field('series') then
if autors_in_series(serie)==1 then
strcat('authors}/{series}/{series} {series_index:0>3s} - {title} - {authors')
else
strcat('series}/{series} {series_index:0>3s} - {title} - {authors')
fi
else
strcat('authors}/{title} - {author')
fi;}
this code dont work for single author and dont add author name to file and make folder for book file Can anybody help?
|
|
|
|
![]() |
| Tags |
| calibre, save disk calibre |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Save to disk. | dunhill | Calibre | 4 | 11-06-2020 01:48 AM |
| Save to disk | edeniz | Editor | 4 | 11-22-2015 05:20 PM |
| Save to Disk | Dethmaul | Library Management | 2 | 09-03-2015 02:11 AM |
| Save on disk | sydspanien | Calibre | 2 | 09-20-2014 06:06 PM |
| Save to Disk | beckywc | Library Management | 3 | 06-06-2011 09:54 PM |