05-24-2024, 02:12 PM | #1 |
Addict
Posts: 238
Karma: 100000
Join Date: Oct 2012
Device: Calibre
|
How do I include "path" in a Calibre catalog CSV?
How do I include a book's "path" in a Calibre catalog CSV? Why's there's no option, in the "Create a catolog…" dialog box, for the path column?
|
05-24-2024, 02:20 PM | #2 |
creator of calibre
Posts: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Books dont have a path field. you can generate paths to individual format files with calibredb list command but the catalog doesnt do that.
|
Advert | |
|
05-24-2024, 02:21 PM | #3 |
Well trained by Cats
Posts: 30,452
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
A CSV Catalog shows all columns in the configuration list (this includes User Created)
(It may not show a Calculated one. I don't use those, so no can test) You then use your favorite spreadsheet to format a report But Why? You really want to use Calibre or the content server and keep little hands away from the internals of the Library folder. That leads to damage |
05-24-2024, 02:37 PM | #4 |
the rook, bossing Never.
Posts: 12,378
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Pretend the books are not on a path, but inside the database. They would be, except that doesn't work.
The "Calibre Library" contents should be regarded as a black box you can export using GUI or content server. |
05-24-2024, 08:27 PM | #5 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Might even be be able to automate with the Action Chain plugin. You could use a regex equipped editor on the CSV to cut out the HTML markup and URL encoding. Sample CSV attached - in a zip. Curious - what's the purpose of wanting it? BR |
|
Advert | |
|
06-01-2024, 07:35 AM | #6 |
Wizard
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Create a custom column as Column build from other columns (see attachments)
Lookup name: pathfilename Remark: Prints all file names in case there exists more then one file record for a book. Downside: Delays Calibre startup a little bit. I usually hide those kind of columns in the library view (w/o check mark for the column, see column #31) and show them only in the book details window as you can see in first picture attached.Column heading: Pfad&DateinameAll Column type: Column build from other columns Template: {:'formats_paths()'} You can now use this newly created column where ever you want, e.g. in the book details panel or with Catalog like shown in picture two and three Depending on for what you want to use it for this it is one possible solution. But Kovids solution is much better suited if you want to use the .csv file for further processing. |
06-02-2024, 03:24 PM | #7 |
Fool
Posts: 424
Karma: 3585252
Join Date: Feb 2003
Device: Kindle: Voyage,PW1,KOA, Kobo: Clara Colour, Nook GLP, Pocketbook verse
|
I use this to create a catalog that contains the paths. You can probably modify it to work for you. (I don't really remember why this works, but I understood it once upon a time)
calibredb.exe catalog "C:\Users\smill\Dropbox\My Calibre\Catalog.epub" --generate-authors --generate-descriptions --generate-series --generate-titles --header-note-source-field=#paths |
06-02-2024, 03:31 PM | #8 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
This goes for ALL of you who want the path. YOU DON NOT NEED THE PATH AND YOU SHOULD NOT HAVE IT DISPLAYED. |
|
06-02-2024, 07:30 PM | #9 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
06-02-2024, 08:14 PM | #10 |
Bibliophagist
Posts: 40,599
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
There are times when I feel that calibre should have used long numeric fields for both the directories and filenames to make it harder for people to grumble about the directory structure/filenaming conventions used. A random GUID lookalike for the author directory and the same with the calibre ID appended for the book directory? 99b1d595-2f03-40d0-89d6-01e7a5ed20d0/881d3ce3-458e-4145-928f-cd3fbffb76af-0012003 for example with the book filename being 881d3ce3-458e-4145-928f-cd3fbffb76af.epub. This would also solve those complaints about not being able to use extended character sets in the filenames.
I've had to deal with a few idiots who decided to re-arrange their calibre libraries and then "Help! My calibre library doesn't work!." One decided that he did not like the author/name/title (numbers)/ format and renamed/moved them to a author/ format which calibre was not happy with. At least, they did rename all the cover.jpg and metadata.ofp to booktitle.jpg and booktitle.opf so the structure was recoverable with some pain. The other decided to move all the ebooks/cover images/metadata into a single directory for convenience. Sadly this ended up with one cover.jpg and one metadata.opf file in that single directory and calibre thinking there were no books in the library. Both of them felt this was partly my fault for introducing them to calibre and partly the fault of calibre's author for not allowing them to use a random directory structure. Evidently calibre should emulate other programs that they use that allow to keep files where they want though moving those files can lead to "interesting" results. Last edited by DNSB; 06-02-2024 at 08:17 PM. |
06-02-2024, 08:31 PM | #11 | |
Zealot
Posts: 106
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
Quote:
If most other programs with similar "files / library / database" functionality all work more or less the same way it isn't totally unreasonable to assume that yet another program might also work that same way. I know it took me a while to really understand that the library belongs to Calibre, not me. |
|
06-02-2024, 09:15 PM | #12 |
Bibliophagist
Posts: 40,599
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Going back a few years, one horrible example is one friend of mine who used iTunes. When he imported his music files into iTunes, he unchecked the Copy files to iTunes Media folder when adding to library so he did not have duplicated files. He edited the song info to add/correct song titles, artists, albums, genre, track numbers etc. I don't know how many hours he worked on this over about 4 years.
Then he made a small mistake. His computer said it was low on disk space so he went looking for stuff he could delete. He had a directory in Downloads that he used for music downloads and during a brain cramp, he included that directory in his to be deleted selection. When he hit delete on his selections, he got the too big for the recycle bin popup and clicked on continue. No problems for a couple of weeks and then he decided to update some music on his iPad. Ooopss. Couldn't do that since the files could not be found. We managed to recover about 80-90% of his music from an old backup (he stopped doing backups to the external hard drive because it just took too much time) and from running a scan for deleted files on his hard drive. And as I've mentioned before, I've had some fun helping friends/acquaintances attempt to recover from calibre library corruption after they attempted to modify it's structure, store it in the cloud, etc. which may have left me feeling that anyone who mucks directly with the calibre library has the approximate IQ of a watermelon. The other examples I've seen people mentioning have been programs such as Word, VLC, etc. where there is no database of file locations beyond the recent files list. |
06-02-2024, 10:01 PM | #13 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
My take is that the data, i.e the library, belongs to me, calibre is a tool I use to organise, manipulate and access that data… but not exclusively.
So, why would I copy the file path to that EPUB in my earlier post and not copy the calibre view-book link to the EPUB? If I put the calibre view-book link into another application, then when I click on that link the calibre Viewer will open the EPUB, and the calibre library manager will start or switch to the Default library. If I put the file path link into another application, then when I click on that link the calibre Viewer will open the EPUB… end of story. The calibre library manager would not be started, and if it was running it would NOT switch to the Default library. BR Last edited by BetterRed; 06-02-2024 at 10:04 PM. |
06-02-2024, 10:12 PM | #14 |
the rook, bossing Never.
Posts: 12,378
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Arrrgh!
In an ideal wold you could copy arbitrary files actually into to the database. In a sense with the more complex Client/Server Databases you can by having a sort of arbitary size binary blob type. But the performance is atrocious and you have to import/export. SQLight can't do it. I tried it and concluded a "black box" set of files is far better and the database then just has the filename. Import and Export is a simple OS file copy. I'd not have used a big GUID like 99b1d595-2f03-40d0-89d6-01e7a5ed20d0/881d3ce3-458e-4145-928f-cd3fbffb76af-0012003 but simply creation date (ISO so 20240603 for today with a suffix serial ID for the Nth created). I'd have that for AuthorID directory and then subdirectory with an ISO date+ serial id for title and then the resources in that. But the current scheme works fine. EDIT Also the library softwares I did for books and video of course used barcodes. You had to add a barcode to the object as you might have multiple copies of the same physical book or VHS, so can't use the ISBN or EAN etc. The document management system added a barcode to any document printed. Any arbitrary document could be scanned and become a multi-page TIFF (As we had them from a FAX server anyway), though I might be wrong on that. If the document was from a specific categorised source the scanning SW would decode the barcode from the captured page to automatically index it. It was over 20 years ago, so I don't remember all the details. An archive export for CD generated a static set of catalogues and indexes that worked on a browser with no javascript. So archives from it would work on any browser or OS. The live system was Client/Server multiuser with MS-SQL and a VB6 based client. The files not available directly to users and all just ISO date with serial number suffix. Last edited by Quoth; 06-02-2024 at 10:27 PM. |
06-02-2024, 10:18 PM | #15 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
Tags |
calibre, calibredb, catalog, csv, path |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change Author of "Create a Catalog" instead of "Calibre" | TinkerToyz | Library Management | 2 | 10-18-2020 09:56 PM |
Does Calibre's "GET BOOKS" option include illegal sources/downloads? | runforcover | Calibre | 3 | 02-13-2017 05:19 AM |
Is there a lazy way to split a "create catalog" csv | LadyKate | Calibre | 3 | 11-25-2016 03:03 PM |
include "This article was downloaded by calibre from" for tablet profile | Purple Lady | Recipes | 10 | 06-23-2013 02:28 AM |
How to use "catalog CSV/XML" plugin? | katsu | Library Management | 4 | 10-14-2011 12:07 PM |