Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50069

I need help with writing a template program to exclude some books from being tagged

$
0
0
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.

Thanks.


```
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');
```

Viewing all articles
Browse latest Browse all 50069

Latest Images

Trending Articles



Latest Images