![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Feb 2025
Device: Kindle Scribe, Kobo Colour
|
Custom column - file formats
Hello there.
Thanks for allowing me to join for forum. ![]() I've been using Calibre for a while, but it's only now that I've sat down to organise all my books and audio books. I've got about 680 books so far, with about 35 or so that have an audiobook version. I've added the audiobooks into Calibre - they have file formats of .m4a, .m4b, and .mp3. I'm trying to create a custom column that uses the Formats column to check for those file formats and then populate an 'Audiobook' column with the text 'Audiobook available' or something similar. I can get it to work with this code for one format, Code:
program: contains(field('format'),'m4a','Audiobook available','') Any help would be appreciated. Thanks in advance ![]() |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,174
Karma: 1988646
Join Date: Aug 2015
Device: Kindle
|
Code:
program:
contains(field('format'), '(mp3|m4a|m4b)', 'Audiobook available', '')
Last edited by capink; 02-02-2025 at 12:20 PM. |
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,269
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Something like
Code:
program: If 'm4a|m4b|mp3' inlist $formats then 'Audiobook available' fi |
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Feb 2025
Device: Kindle Scribe, Kobo Colour
|
Thank you! This worked perfectly!
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 822
Karma: 409968
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
I have something like this to tell me if it is an audio format.
This will say yes or no according to the format Code:
program:cmp(count(template('[[format]]'), ','), 1, 'no', in_list(template('[[format]]'), ',', 'Ogg', 'Yes', 'no', ',', 'M3u', 'Yes', 'no', ',', 'M4a', 'Yes', 'no', ',', 'Mp3', 'Yes', 'no'), 'no') Last edited by dunhill; 02-02-2025 at 01:38 PM. |
![]() |
![]() |
![]() |
#6 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,500
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,780
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You could just use the basic search, then Tag all the results. No need for a custom column.
Code:
format:mp3 or format:m4a or format:m4b The use the MDE (in bulk mode) to Add a Tag "has audiobook" |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column to show a truncated file path | TreeFrogBandit | Library Management | 2 | 02-28-2020 07:11 PM |
Using RE to extract pattern from custom column into another custom column | activedirectory | Library Management | 1 | 12-15-2019 08:07 PM |
Custom column returns value based on value of another custom column? | calvin-c | Calibre | 3 | 09-14-2013 02:24 PM |
Library - Custom Column with File Name | AmerInstOfBi | Library Management | 3 | 04-26-2013 11:29 AM |