1
submitted 8 months ago* (last edited 8 months ago) by JaymesRS@literature.cafe to c/calibre@lemmy.world

I use the page count plugin plus a template program I adapted from one found online (included below) to build a column that categorizes books by length. (I use this to build collections I use when I’m picking my next to read)

I’d like to exclude certain books from getting a classification though if they are PDFs or have tags like “Graphic Novel” or “Cookbook”. I’d appreciate any help figuring this out.

program:
val = field('#pagecount');
first_non_empty(
	cmp(val, 0, ' ', '', ''),
	cmp(val, 15, 'Flash Fiction', '', ''),
	cmp(val, 50, 'Short Story', '', ''),
	cmp(val, 100, 'Novelette', '', ''),
	cmp(val, 250, 'Novella', '', ''),
	cmp(val, 500, 'Short Novel', '', ''),
	cmp(val, 750, 'Long Novel', '', ''),	
	cmp(val, 1000, 'Tome', '', ''),
	'Toe Breaker');
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 04 Jan 2024
1 points (100.0% liked)

Calibre

428 readers
1 users here now

For discussion about the Calibre ebook management software.

founded 1 year ago
MODERATORS