03-29-2011, 07:37 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Mar 2011
Device: Nook
|
[Old Thread] Adding new column to sort by filename
Haven't found a simple explanation on how to do it anywhere; I want to be able to sort and navigate some of my books by their filename.
|
03-29-2011, 08:21 PM | #2 |
Wizard
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
Forgive me for asking but why?
|
Advert | |
|
03-29-2011, 08:36 PM | #3 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
If it can be done I'm sure someone will stop by and assist you in this effort. |
|
03-30-2011, 03:25 AM | #4 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I assume you're talking about the filename the files originally had? I know of no way to include that in the database in any way except through manual input. If you're talking about the file name of the book in the Calibre library, though, you could create a custom composite column with the template "{title} - {authors}", though you could just as easily just sort by title first and authors second.
|
03-30-2011, 07:29 AM | #5 |
Wizard
Posts: 2,013
Karma: 251649
Join Date: Apr 2010
Location: Tempe, AZ, USA, Earth
Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home)
|
It seemed to me the OP was wanting to alter the database to maintain original filenames but until s/he responds back here, we won't really know.
|
Advert | |
|
03-30-2011, 08:27 AM | #6 | ||
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Setting the below tweak might accomplish what the OP wants by sorting the library upon start up. Quote:
|
||
03-30-2011, 08:56 AM | #7 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Alternately, you could shuffle the filename into comments with S&R, re-add the file correctly as a new record, do a merge of the two records to keep the filename metadata, etc. to get it all into a single record. I'm not sure it's worth all this effort, but it's at least possible to do it this way. Last edited by Starson17; 03-30-2011 at 08:59 AM. |
|
03-30-2011, 11:04 AM | #8 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Ah, yeah, you're right. I didn't realize it could be done that way.
|
03-30-2011, 11:35 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
But not very effectively, as there's no good way to use part of the filename twice. Once you've grabbed part of the filename as the title, you can't use that same portion of the filename as part of anything else.
I did consider writing an option checkbox to store the original filename into the comments field. I do occasionally like to keep track of where it came from, or need to keep bits of the filename like "author - title - (corrected version 1.2).txt" that don't fit anywhere else, but there wasn't much demand, and I found my own needs evolved to where I really didn't find much use for that "extra" info. |
05-03-2011, 01:12 PM | #10 | |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
Quote:
I think it would still be helpful, and there is lots of empty space on the second tab in metadata... |
|
05-03-2011, 02:02 PM | #11 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
I regret that I don't have any spare time to implement this, but from my work on the automerge code I'm pretty sure this is not all that difficult to do. Calibre has the filename in its grasp during the add process and it's just a matter of concatenating it into comments along with the other metadata being filled in when the ebook is added. The main problem is that this is most useful for a beginner who's just starting up by transferring an existing collection into calibre, and a beginner is never familiar enough with obscure calibre options to make much use of a feature like this. |
|
05-03-2011, 02:36 PM | #12 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
You are right in that, now when I'm bit more advenurous and have even .8 mode and several plugins, I've learned to accept the loss of the filename. On the other hand, adding those plugins was so easy. It is definitely worth asking, thanks.
|
02-12-2012, 07:47 AM | #13 |
Addict
Posts: 288
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
|
Sorry to dig this up, but I have the same issue at present.
I really would like to be able to sort my library by file length (Having issues with about 50books that are two long in their path length) If a file name column, or a way to sort the library by lenght of title then I could easily find and edit those files. As it is I'm left with creating a file list in windows (dir /b /s > c:\filelist.txt) and importing to Excel, then a "len" formula and sort, will get me a sorted list - but that still leaves me with a time consuming way to find and edit the files in Calibre. Anyone had anymore thoughts on this. Regarding another way to do what I want: If anyone can help me with a Reg Expression in the search and replace metadata editing. It seems all of my too long files are because of titles that include, sub titles ie Here Comes Civilization: The Complete Science Fiction of William Tenn Volume II Obviously that makes a long file name - even in the root of C:\ C:\14ThousandBooks\William Tenn\Here Comes Civilization: The Complete Science Fiction of William Tenn Volume II (10166)\Here Comes Civilization: The Complete Science Fiction of William Tenn Volume II - William Tenn.mobi All I need is a Reg Expression to search for ": " colon and space and any subsequent text and replace with nothing, I did try but Python is not my thing. Any takers? |
02-12-2012, 08:31 AM | #14 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Highlight your books in the library. Open the Edit Metadata window. Click on Search and Replace tab. Search field: title Search mode: Regular Expression Search for: : .* Replace with: leave blank Destination field: title (or leave blank) Click Apply This worked for the six books I tested it on. YMMV. |
|
02-12-2012, 08:46 AM | #15 |
Addict
Posts: 288
Karma: 1003542
Join Date: May 2011
Device: Google Nexus 7 16GB
|
Just spent half an hour looking at python, I feel dizzy I came up with this (: )[a-z 0-9]* Like yours much better dwanthny - thanks - will check it now. Yep, that did the trick, simple when you know, but painful when you don't did come across this one that gets rid of anything in () if anyone finds it useful (\(.*\)) There should be a list of these somewhere, you know ones that are useful for book sorting Last edited by transmitthis; 02-12-2012 at 08:49 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre: Read Filename into Custom Column | juston | Library Management | 3 | 07-25-2019 12:34 AM |
Adding a Sort column in main GUI | handycam | Calibre | 11 | 12-21-2010 07:47 AM |
Request Library to sort by filename and have search capabilities | drwoood | enTourage Archive | 11 | 07-03-2010 06:09 PM |
505: Is is possible to sort the book by FILENAME? Or to use FOLDERS? I get crazy | drmaniac | Sony Reader | 6 | 10-18-2008 01:07 PM |