View Single Post
Old 05-12-2024, 01:05 PM   #2915
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: 11,160
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Read this:

https://github.com/JimmXinu/FanFicFa...d-fics-to-kobo

Additionally, I use this template in a composite column. It displays fanfic chapters as currentchap/totalchap.

Code:
program:

	input = $#kobobookmark;
# Don't change this to 'count' as that's a function
	ccount = $$#chaptercount;

	if 
## Checks that a Fanfiction has a Kobo bookmark and is not anthology|oneshot
## You may want to use '$#fandomcolumn' instead of '$#booktype=='Fanfiction''
		$#booktype=='Fanfiction'
		&& 
		substr(input, 0, 10) == 'OEBPS/file'
		&& !$#fanficstatus in 'Anthology,Oneshot'
	then
## Extracts the 'current chapter' from the bookmarks, subtracts 1, and then formats them as 'currentchap/totalchap'
## You can remove the '- 1' if you want, just make sure to leave the comma.
			strcat(format_number(re(input, '.*\/file(\d+).*', '\1') - 1, '{0:,d}'), '/',ccount)

## Display 'Not Set' if there's no chapter count
	elif
		ccount == 'None'
	then
		'Not Set'

## Display regular chapter count for other books that have at least two chapters
	elif
		$#booktype=='Fanfiction' || ccount >#1
	then
		ccount
	fi

Last edited by ownedbycats; 05-12-2024 at 01:10 PM.
ownedbycats is offline