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 01-19-2011, 11:43 AM   #1
kakkalla
Connoisseur
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 89
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.
kakkalla is offline   Reply With Quote
Old 01-19-2011, 12:01 PM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,112
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Have you looked at the tweak available for setting Title sort?
itimpi is offline   Reply With Quote
Old 01-19-2011, 12:05 PM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by kakkalla View Post
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.
Go to preferences - tweaks and locate the below tweak and copy it to the lower panel.

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'
DoctorOhh is offline   Reply With Quote
Old 01-19-2011, 12:08 PM   #4
kakkalla
Connoisseur
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 89
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.
kakkalla is offline   Reply With Quote
Old 01-19-2011, 12:37 PM   #5
kakkalla
Connoisseur
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 89
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!
kakkalla is offline   Reply With Quote
Old 01-19-2011, 01:27 PM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,112
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by kakkalla View Post
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.
You probably did not scroll down - Advanced is at the bottom of the Preferences dialog.
itimpi is offline   Reply With Quote
Old 01-19-2011, 01:29 PM   #7
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,927
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by kakkalla View Post
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!
If I understand what you did, then you will lose those settings every time you upgrade calibre.

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.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	60
Size:	70.8 KB
ID:	65112   Click image for larger version

Name:	Clipboard02.jpg
Views:	53
Size:	70.1 KB
ID:	65113  
chaley is offline   Reply With Quote
Old 01-19-2011, 01:31 PM   #8
kakkalla
Connoisseur
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 89
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!
kakkalla is offline   Reply With Quote
Old 01-19-2011, 07:45 PM   #9
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by kakkalla View Post
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
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?
Manichean 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
Regular Expression Help Azhad Calibre 86 09-27-2011 03:37 PM
Regular Expression Help iKarampa Calibre 13 12-15-2010 08:17 AM
Regular expression help krendk Calibre 4 12-04-2010 05:32 PM
Regular Expression Help smartmart Calibre 5 10-17-2010 06:19 AM
Help with the regular expression Dysonco Calibre 9 03-22-2010 11:45 PM


All times are GMT -4. The time now is 11:54 AM.


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