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!

Calibre

!calibre@lemmy.world

Create post

For discussion about the Calibre ebook management software.

Community stats

  • 9

    Monthly active users

  • 10

    Posts

  • 1

    Comments

Community moderators