Quote:
Originally Posted by JSWolf
Would you mind sharing your code for the finished column? I want to do that but no need to reinvent the wheel. Thanks.
|
As an alternate to DNSB's, here's my custom readstatus() template function:
Code:
program:
if 'dnf' inlist $#admintags
then 'didnotfinish'
elif ($$#percentread >=#1 && $$#percentread <=#99) || ($#readinglist == 'Reference')
then 'currentlyreading'
elif $#readinglist=='To Be Read' && $$#percentread ==#0
then 'toberead'
elif $$#percentread >=#100
then 'read'
elif $$#percentread == 'None'
then 'undefined'
elif $$#percentread >=#0
then 'unread'
fi
I use it anywhere that I need to reference the read-status of a book. However, one of its main uses is my composite Read Status column:
Code:
program:
status = readstatus();
times = $$#timesread;
switch_if(
status=='currentlyreading' && times>#0, 'Currently Rereading',
status=='currentlyreading', 'Currently Reading',
status=='toberead' && times>#0, 'To Be Reread',
status=='toberead', 'To Be Read',
status=='read', 'Read',
status=='unread' && 'readinggoal:' in $#admintags, 'Backlog',
status=='unread', 'Unread',
status=='didnotfinish', 'Did Not Finish',
''
)