View Single Post
Old 10-04-2018, 09:57 PM   #4
Montana Harper
book geek (she/her)
Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.Montana Harper ought to be getting tired of karma fortunes by now.
 
Montana Harper's Avatar
 
Posts: 116
Karma: 2029154
Join Date: Sep 2013
Location: Pacific Northwest
Device: iPhone 16 Pro Max, Kindle Paperwhite (10th gen)
Thumbs up

Thank you both! I got it working exactly as I wanted.



The documentation is a bit lacking in information about how to use general program mode with custom columns, so I wanted to note—for the benefit of future information seekers—that even though it doesn't look like the program is properly formatted when you paste it from a text editor into the template field when creating a custom column, if it saves properly it should work...assuming the program syntax is correct, of course!

My final template:
Code:
program:
words=raw_field('#words');
length=first_matching_cmp(words,
     1,'UNCOUNTED',
     1001,'Flashfic',
     7500,'Short Story',
     17500,'Novelette',
     40000,'Novella',
     70000,'Short Novel',
     180000,'Novel',
     'Novel Plus')
This flags entries with empty word-count fields as UNCOUNTED, so I know I need to run the Count Pages plugin on them (rather than assigning the label Flashfic to them, which would be incorrect).
Montana Harper is offline   Reply With Quote