Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2025, 12:15 AM   #1
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,258
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
Automatically setting a y/n column?

I wasnt' sure if this should go in the "Action Chains" or "Bulk Find/Replace" or anywhere else, but I figured it could be asked here.

I am updating my library to match my Story Graph information. The problem is that there are a lot of problems with the matching in Story Graph, and in order to fix many of them I had to go in and add the Amazon ASIN as an identifier. In Calibre I have a y/n column to indicate if a book is currently in The StoryGraph, and for books that I had to go in and add the ASIN in order to get them to match with Calibre I would like to create an action chain that would automatically copy the amazon ASIN identifier to my created sg_isbn_uuid Identifier, and then mark the '#in_sg' column as yes (it's a yes/no column)

I know it's not a huge deal to do it manually, but I was wondering if there was a way to get an automatically marked y/no column some way.
Rellwood is offline   Reply With Quote
Old 03-26-2025, 06:32 AM   #2
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,954
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Does it have to be actual boolean? A composite column returning true/false with "show checkmarks" would work, i think. Someone else would have to help with template because I'm a little confused on what you're doing.

Last edited by ownedbycats; 03-26-2025 at 07:11 AM.
ownedbycats is online now   Reply With Quote
Advert
Old 03-27-2025, 01:39 PM   #3
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,403
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
I'd be interested in this functionality. I've got a reading position column (null - 100) which is updated from my Kobo and a Read column (Y/N checkmarks). I have never been able to get the Read column to automatically switch to Y if the reading position is 100; I have to do this manually; which is a pain if I've been reading a lot of short stories.
maddz is offline   Reply With Quote
Old 03-27-2025, 01:50 PM   #4
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,954
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by maddz View Post
I'd be interested in this functionality. I've got a reading position column (null - 100) which is updated from my Kobo and a Read column (Y/N checkmarks). I have never been able to get the Read column to automatically switch to Y if the reading position is 100; I have to do this manually; which is a pain if I've been reading a lot of short stories.
Boolean column - replace with composite:

Click image for larger version

Name:	2025-03-27 14_50_05-Create a custom column.png
Views:	44
Size:	22.2 KB
ID:	214681

Code:
program:

## Replace with your percent-read column
percent = raw_field('#percentread', -1);

	switch_if(
		percent ==#100, 'yes',
		percent==#-1, '',
		'no'
		)
Remove line 8 if you want nulls to display 'no' instead of empty. Show Checkmarks turns into checkmarks.

Last edited by ownedbycats; 03-27-2025 at 01:58 PM.
ownedbycats is online now   Reply With Quote
Old 03-27-2025, 03:34 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,108
Karma: 168961902
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For my Finished column which is likely the equivalent of your Read column built from the Kobo Reading Percentage column, I use the following template and column setup (see image).

Code:
{:'cmp(field('#koboreadpct'),100,'','Finished','Finished')'}
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2025-03-27 123300.png
Views:	47
Size:	32.4 KB
ID:	214682  
DNSB is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column for Automatically Setting Status? TheArtfulDodger Calibre 6 04-27-2020 03:00 PM
Automatically setting title sort Rellwood Calibre 7 12-23-2018 08:15 PM
Setting the Yes/No tag AUTOMATICALLY? Ersatzreifen Library Management 2 02-18-2016 04:25 AM
Calibre automatically setting PDOC status Siavahda Conversion 1 07-13-2015 04:59 AM
Automatically send news to column fandson Calibre 5 03-26-2013 12:51 AM


All times are GMT -4. The time now is 10:57 AM.


MobileRead.com is a privately owned, operated and funded community.