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, 10:43 AM   #1
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
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.
kakkalla is offline   Reply With Quote
Old 01-19-2011, 11:01 AM   #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,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?
itimpi is offline   Reply With Quote
Advert
Old 01-19-2011, 11:05 AM   #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: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, 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, 11:08 AM   #4
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
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.
kakkalla is offline   Reply With Quote
Old 01-19-2011, 11:37 AM   #5
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
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!
kakkalla is offline   Reply With Quote
Advert
Old 01-19-2011, 12: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,552
Karma: 950151
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, 12:29 PM   #7
chaley
Grand Sorcerer
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: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
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:	284
Size:	70.8 KB
ID:	65112   Click image for larger version

Name:	Clipboard02.jpg
Views:	256
Size:	70.1 KB
ID:	65113  
chaley is offline   Reply With Quote
Old 01-19-2011, 12:31 PM   #8
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
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!
kakkalla is offline   Reply With Quote
Old 01-19-2011, 06:45 PM   #9
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
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 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


All times are GMT -4. The time now is 04:04 PM.


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