I think you can do this from Calibre with the Kobo touch extended plugin and a custom general program template. This only checks if there is one file format, and if it’s PDF, then sets the save directory from there
I’m not sure how best to change it so it could do PDF or CBZ/CBR, the documentation on Calibre is hard to digest.
You’d probably want to check your settings in the kobo touch extended as well so that it doesn’t try and auto kepub the PDF when you send it to the kobo.
To use this function connect the device or go to settings > plugins > kobo touch extended and edit the save format.
I’m on mobile too so sorry for the formatting.
```
program:
# Template function to check if PDF is the only format
# Use with Kobo plugin where pdf conversion is not ideal and pdf is the preferred format
# Use to avoid having Kobo plugin convert to kepub
book_formats = field('formats');
format_length = count(book_formats,',');
found_format = str_in_list(book_formats, ',', '1', '0');
save_path = '';
if format_length == 1 && found_format == 1 then
save_path = '.pdfs/{author_sort} - {series}{series_index:0>2s| | - }{title} - {authors}'
return save_path
else
save_path = 'books/{author_sort}/{series}/{series}{series_index:0>2s| | - }{title} - {authors}'
return save_path
fi
```
This one is in the extra settings tab under template for kepubification, as an example for you
```
program:
# Template function to lookup CBZ or CBR Manga file formats
# Use with Kobo plugin where 'epubs' by KCC have been added to the format
# Use to avoid having Kobo plugin convert KCC kepub to kepub
book_formats = field('formats');
shelfs = field('#calibre_web_shelf');
found_format = str_in_list(book_formats, ',', 'cbr', 'found cbr', 'cbz', 'found cbz', 'no comic found');
found_shelf = str_in_list(shelfs, ',', 'Graphic-novels', 'found shelf','no shelf found');
if str_in_list(book_formats, ',', 'cbr', 'found cbr', 'cbz', 'found cbz', 'no comic found') || str_in_list(shelfs, ',', 'Graphic-novels', 'found shelf','no shelf found') then
return ''
else
return 'true'
fi
```
|