01-19-2011, 10:43 AM | #1 |
Zealot
Posts: 143
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
|
Regular expression for Title sort
I prefer to have the author sort show the First Name and then the Last Name.
In order to do this to all of my ebooks in calibre, I did the following using the search and replace panel. 1. In the Search field I selected author_sort. 2. In the Search for field: (.*) 3. In the replace with field: \1 4. Destination field: author sort This worked like a dream. It gave me exactly what I wanted. Thanks to all those geniuses who develop this software. I also prefer to have the Title Sort the same as the Title of the book. For example, one of my books is The Big Four. The Title sort in the edit meta information panel is Big Four, The. I don't like this. I would prefer to have the Title sort as: The Big Four. So I thought I could do the same thing as the Author sort. I thought that I could simply copy the data in the the 'Title' field to the Title Sort field. Sigh. No luck. There is no title_sort name in the Destination field. Is it possible to do this? Could this please, please be a feature in the future? Thank you very much. |
01-19-2011, 11:01 AM | #2 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Have you looked at the tweak available for setting Title sort?
|
Advert | |
|
01-19-2011, 11:05 AM | #3 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Code:
# Control title and series sorting in the library view. # If set to 'library_order', Leading articles such as The and A will be ignored. # If set to 'strictly_alphabetic', the titles will be sorted without processing # For example, with library_order, The Client will sort under 'C'. With # strictly_alphabetic, the book will sort under 'T'. # This flag affects Calibre's library display. It has no effect on devices. In # addition, titles for books added before changing the flag will retain their # order until the title is edited. Double-clicking on a title and hitting return # without changing anything is sufficient to change the sort. title_series_sorting = 'strictly_alphabetic' |
|
01-19-2011, 11:08 AM | #4 |
Zealot
Posts: 143
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
|
In the help manual, it says to go to Preferences>Advanced/Tweaks.
I have the latest version of calibre on my Mac and when I go to Preferences, I only see Interface (with sub headings), Conversion (with sub headings), Import/Export and Sharing. I can't see the Tweaks or Advanced anywhere. |
01-19-2011, 11:37 AM | #5 |
Zealot
Posts: 143
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
|
THANK YOU. I found it. I right clicked on calibre>Show package contents and then I edited the default_tweaks.py file.
THANK YOU so much! |
Advert | |
|
01-19-2011, 12:27 PM | #6 | |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
|
|
01-19-2011, 12:29 PM | #7 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Editing tweaks really is in preferences. See the attached screen shot, which probably looks like what you are seeing. Note the scroll bar. Advanced is scrolled on the bottom, off the screen, as seen in the second screen shot. You can also manually edit the default tweaks file in your configuration folder. However, if you can't find the tweaks preference you also won't be able to find the button that opens that folder. If you know where it is, then go there and edit default_tweaks.py. |
|
01-19-2011, 12:31 PM | #8 |
Zealot
Posts: 143
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
|
Yes! You are right. I have been mucking around for five hours straight and it is 4.30 am now. Got to get some shut eye.
Cheers and thank you VERY much! |
01-19-2011, 06:45 PM | #9 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
If I read this correctly, and I may not given what time it is here, this only reads the entire content of the author_sort field and writes the exact same content back to the field. How does this change anything? Is this maybe equivalent to doing the "recalculate author_sort" bit in the manage authors dialog?
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regular Expression Help | Azhad | Calibre | 86 | 09-27-2011 02:37 PM |
Regular Expression Help | iKarampa | Calibre | 13 | 12-15-2010 07:17 AM |
Regular expression help | krendk | Calibre | 4 | 12-04-2010 04:32 PM |
Regular Expression Help | smartmart | Calibre | 5 | 10-17-2010 05:19 AM |
Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 10:45 PM |