Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2022, 04:23 AM   #1
tn4w
Enthusiast
tn4w began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2022
Device: Windows 10
Bulk-copying identifier values

Hello,

I'm looking for a way to bulk-copy identifier values of selected books. I've added books with an identifier named asin.

In particular, I'd like to copy ASINs of books without a zip format with a certain keyword in the title and with a size over 20 MB. From the UI, I could successfully select books that match the following search criteria by sorting them by size.

Code:
keyword and not formats:"=zip"
However, there doesn't seem a way to bulk-copy their ASINs from the UI.

Then, I tried the calibredb list command. Not sure if formats:"!=zip" is in effect as the result seems the same with formats:"=zip".

Code:
calibredb list --search title:"keyword" identifiers:asin:true --fields identifiers,title formats:"!=zip"
Also, with the command, it is possible to specify a size?
tn4w is offline   Reply With Quote
Old 12-27-2022, 07:47 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,784
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by tn4w View Post
Hello,


Code:
calibredb list --search title:"keyword" identifiers:asin:true --fields identifiers,title formats:"!=zip"
Also, with the command, it is possible to specify a size?
from the calibredb list doc
Quote:
--fields, -f

The fields to display when listing books in the database. Should be a comma separated list of fields. Available fields: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid Default: title,authors. The special field "all" can be used to select all fields. In addition to the builtin fields above, custom fields are also available as *field_name, for example, for a custom field #rating, use the name: *rating
But, isn't size really format dependent? I might see word or page count (custom column populated by the count pages PI) being of use.

You got me puzzled. ASIN (like ISBN) is a unique value assigned to an single book. How would you do BULK operations (as apposed to batch operations)?

Last edited by theducks; 12-27-2022 at 07:48 AM. Reason: code tag looke poorly
theducks is offline   Reply With Quote
Advert
Old 12-27-2022, 08:15 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 78,492
Karma: 142993688
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
from the calibredb list doc

But, isn't size really format dependent? I might see word or page count (custom column populated by the count pages PI) being of use.

You got me puzzled. ASIN (like ISBN) is a unique value assigned to an single book. How would you do BULK operations (as apposed to batch operations)?
What he wants is something like Extract ISBN but for ASIN instead of ISBN.

But for now, ASIN extraction is a manual process.
JSWolf is offline   Reply With Quote
Old 12-28-2022, 02:18 AM   #4
tn4w
Enthusiast
tn4w began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2022
Device: Windows 10
Quote:
Originally Posted by JSWolf View Post
But for now, ASIN extraction is a manual process.
Thanks for the info.

For now, I resort to a third-party SQL program. This query seems to do the job.

Code:
SELECT identifiers.val FROM books LEFT JOIN data ON books.id = data.book LEFT JOIN identifiers ON identifiers.book = books.id WHERE title LIKE '%keyword%' AND data.format IN ( 'AZW3' ) AND data.format NOT IN ( 'ZIP' ) AND data.uncompressed_size >= 20000000 AND identifiers.type = 'asin';
tn4w is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command that outputs a list of identifier values tn4w Calibre 4 11-14-2022 07:51 AM
What identifier is this? Rellwood Library Management 3 08-06-2021 11:15 PM
Custom Column Values - Bulk Add or Import? userbooknerd Library Management 3 03-11-2021 04:15 PM
Bulk-add identifier khonshu Library Management 6 07-20-2017 11:10 PM
Bulk fill title with same value (like bulk rename author)? rebl Library Management 1 08-22-2014 12:05 PM


All times are GMT -4. The time now is 08:14 PM.


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