|
|
#1 |
|
Member
![]() Posts: 20
Karma: 10
Join Date: Oct 2021
Device: kobo libra 2
|
Custom column - Last Chapter
Hi there
As the title says, i'm looking for a way to display on a custom column, the name of the last chapter of a book. This is somewhat useful for some on-going fanfics i automatically download which the author doesn't update the "complete" tag, and only writes "END(...)" on the last chapter. If there is a way to do this, i will be very grateful to whoever can offer a solution. Best regards
|
|
|
|
|
|
#2 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,364
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I just have an enumerated (fixed-value text) column with the fanfic status. If a book has the incorrect status I just manually set it to complete.
On the topic of keeping track of read chapters, though: Here's the composite column I use to display chapters: Caveats: This depends heavily on two things: 1. You use FanFicFare (because the file structure depends on it) 2. You read with a Kobo and use Kobo Utilities' custom column feature. (As such, your column will only update when you connect the device; I do it on a daily basis, so not much a problem for me.) Code:
program:
## You'll need to replace these column names with your own
input = $#kobobookmark;
status = $#fanficstatus;
# Misspelled this because 'count' is a function
ccount = $$#chaptercount;
if
## I check my 'fandom' column to see if a book is a fanfic
$#fanficcat
then
## This checks that the fanfic has a Kobo bookmark saved
if
substr(input, 0, 10) == 'OEBPS/file'
&&
## I ignore oneshots and FanFicFare anthologies
!status inlist 'Anthology,Oneshot'
then
## Extracts the 'current chapter' from the bookmarks, subtracts 1, and then formats them as 'currentchapno/totalchapno'
strcat(format_number(re(input, '.*\/file(\d+).*', '\1') - 1, '{0:,d}'), '/',ccount)
else
ccount
fi
## This is some other formatting stuff for other books
elif
ccount == 'None'
then
'Not Set'
elif
ccount >#1
then
ccount
fi
Code:
strcat(format_number(re(input, '.*\/file(\d+).*', '\1'), '{0:,d}'), '/',ccount)
Last edited by ownedbycats; 06-22-2022 at 06:39 PM. |
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using RE to extract pattern from custom column into another custom column | activedirectory | Library Management | 1 | 12-15-2019 09:07 PM |
| Adding custom column with any lookup-name gives me empty column as a result? | Ahu Lee | Library Management | 16 | 06-09-2019 01:14 PM |
| Custom column built from word count column | Montana Harper | Library Management | 3 | 10-04-2018 10:57 PM |
| Move selected data from series column to a new custom column | fvdham | Library Management | 3 | 06-02-2017 04:49 PM |
| Custom column returns value based on value of another custom column? | calvin-c | Calibre | 3 | 09-14-2013 03:24 PM |