View Single Post
Old 10-20-2021, 12:16 AM   #915
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,751
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
For those who read fanfics on a Kobo, here's something you can put in a composite column to show how many chapters you've read of a fic as of the last time you connected the device. Note that this relies on using Kobo Utilities and FanFicFare; read the comments for more details.

Click image for larger version

Name:	2021-10-20 01_48_45-Window.png
Views:	854
Size:	5.3 KB
ID:	189720

Code:
program:
# 'Current reading location' stored by Kobo Utilities. 
input = $#kobobookmark;
# These last three are saved by FanFicFare. 
fandom = $#fanficcat;
status = $#fanficstatus;
ccount = $$#chaptercount;

	if 
		fandom
	then

		if	
# Note that this is FanFicFare's file structure. If you download with a different tool, it may not work.	
				substr(input, 0, 10) == 'OEBPS/file'
			&& 	
# Anthologies have a different file structure, so we should ignore those.
				!status inlist 'Anthology'
		then		
# Since I pause at the beginning of chapters, I subtract by one. 
			strcat(format_number(re(input, '.*\/file(\d+).*', '\1') - 1, '{0:,d}'), '/',ccount)
		else
# Showing a regular chapter count for everything else.
			ccount
		fi
	fi
Thanks to those who helped me figure this out a while back.

Last edited by ownedbycats; 10-20-2021 at 12:58 AM.
ownedbycats is online now   Reply With Quote