View Single Post
Old 12-20-2021, 02:03 PM   #1
imNOTdwight
Member
imNOTdwight began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2020
Device: Kobo Libra H2O
Send to Device based on file format

Hello.

I've been trying to send books to different destinations on my device, based on the file type.

Imagine I have two formats in my Calibre library, kepub and epub.

I want to send kepubs to books/author/title, and epubs to .books/author-series-series_index-title.

I've wrote the following "model" but it doesn't work:

Code:
program:
	if field('formats') == "kepub" then
		return strcat("books", "/", field('authors'), field('title'))
	else
		return strcat(".books/", field('authors'), "-", field('series'), "-", field('series_index'), "-", field('title'), field('formats'))
	fi;
it's a very simple implementation, if I got to work I would then add nested conditionals for the series and series_index...

Any help would be appreciated.
imNOTdwight is offline   Reply With Quote