Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2021, 01:34 PM   #1
aCanuck
Junior Member
aCanuck began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2021
Device: Kindle
Lightbulb CSV Import Books With Multiple Tags, and Files?

The TLDR is I'm trying to automate adding books I've backed up back into Calibre. How do you write a .CSV file in such a way that Calibre could expect multiple tags or IDs, anywhere from 0 to a dozen or more of each.


The full explenation:

I've been using Calibre for a few years now, but I'm still "new" as I've mostly just been casually using it to add all the books I've bought through Humble Bundle. But this past week I made an oopsie and broke my library (long story) so I decided to try come up with a solution to automate adding all my books again if I ever repeat this mistake.

Humble Bundle includes .torrent files for each book, so what I have done is download each into a folder system sorted by Bundle and Book, then wrote a Python script to dig down through those folders, extract relevant info for each book (title, author, certain tags, and converting URL files to appropriate IDs for Calibre) that it can print out as a .CSV entry if needed, before finally adding the torrents to qBittorent and downloading them INTO the folder of the book.

I'm looking for advice on how to handle adding all this information to Calibre; programmatically if possible. If I could automatically add each book to Calibre through the Python script that'd be great, since I could have the script automatically delete the files after they has been added to Calibre, but I'll settle for just creating a .CSV and manually importing it afterwards.

I've used .CSV in the past to bulk add empty books, but I'm not sure how to add them with multiples of certain fields, like if I want to add a book with 12 tags and anywhere from 0-10 IDs how would that be written out in .CSV and how do I tell Calibre how they're being added?

Also, is it possible, to add book files, pdf, epub, etc, via the .CSV or do I have to add those manually after the blank books have been added?

I'd be thankful for any advice anyone can provide.
aCanuck is offline   Reply With Quote
Old 07-09-2021, 10:49 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,558
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://manual.calibre-ebook.com/gen...calibredb.html
kovidgoyal is offline   Reply With Quote
Advert
Reply

Tags
advice for a beginner, csv, python


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV import jmt31 Conversion 2 04-12-2020 12:09 PM
Import from CSV JCSullivan Library Management 0 04-12-2012 08:02 AM
Import books from a CSV file EricBr Library Management 1 12-02-2011 12:35 PM
Import order when adding multiple books Sparkling Library Management 5 07-08-2011 08:41 AM
Import books from excel, csv or similar list? BadGandalf Library Management 34 02-11-2011 02:32 PM


All times are GMT -4. The time now is 05:50 AM.


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