MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   Conversion to title case (https://www.mobileread.com/forums/showthread.php?t=104156)

Seanette 10-26-2010 01:02 PM

Conversion to title case
 
First, let me say I love Calibre. Very easy to use and does everything I need from it and then some.

I would like to respectfully suggest for future upgrades, though, that the bit that converts titles to title case be slightly tweaked, since it insists on capitalizing "of", "the", "and", and similar words not normally capitalized in titles unless the first word or occurring after a separator like a colon.

I have no clue how feasible this may or may not be, just kind of throwing it out there to get whatever consideration it may or may not deserve. :)

chaley 10-26-2010 03:11 PM

Something like this was done last week, but isn't released yet.

The 'rules' are described at http://daringfireball.net/2008/05/title_case.

DoctorOhh 10-26-2010 10:29 PM

Quote:

Originally Posted by chaley (Post 1183209)
Something like this was done last week, but isn't released yet.

It seems to be in the current release (0.7.24) and works as advertised. Maybe it will make it to the change log next release. :)

Update: Bulk edits still use the capitalize everything approach.

Seanette 10-26-2010 10:41 PM

Quote:

Originally Posted by dwanthny (Post 1183974)
It seems to be in the current release (0.7.24) and works as advertised. Maybe it will make it to the change log next release. :)

Having trouble finding my version number, but I just downloaded the software within the last week and am finding the oddity mentioned in my first post in the thread.

DoctorOhh 10-26-2010 10:43 PM

1 Attachment(s)
Quote:

Originally Posted by Seanette (Post 1183998)
Having trouble finding my version number, but I just downloaded the software within the last week and am finding the oddity mentioned in my first post in the thread.

It uses the method described in rules linked previously to individual title case changes (see attached), but if you use the bulk title case changes it still uses the old capitalize everything rules. Hopefully the change to the bulk edit window will be in the next release.

Seanette 10-26-2010 11:00 PM

Quote:

Originally Posted by dwanthny (Post 1184006)
It uses the method described in rules linked previously to individual title case changes (see attached), but if you use the bulk title case changes it still uses the old capitalize everything rules. Hopefully the change to the bulk edit window will be in the next release.

I've been doing the case changes while editing metadata, and am in fact getting the result I described above. The alleged change in code is apparently not working in my installation.

How in the world do you find your version number in Calibre, anyway? I tried everything I could think of.

DoctorOhh 10-26-2010 11:26 PM

1 Attachment(s)
Quote:

Originally Posted by Seanette (Post 1184035)
I've been doing the case changes while editing metadata

As long as it is an individual Title Case change it is working for my Windows XP version of calibre 0.7.24. I wouldn't worry about it working or not until it is officially in the change log. Hopefully in the next release.

Quote:

Originally Posted by Seanette (Post 1184035)
How in the world do you find your version number in Calibre, anyway? I tried everything I could think of.

Version number is in the lower left status bar (see attached).

Seanette 10-27-2010 12:17 AM

Quote:

Originally Posted by dwanthny (Post 1184082)
Version number is in the lower left status bar (see attached).

I'm on Vista with 0.7.24 (shrug). It's not a huge functionality issue, just a minor thing that probably only really bugs slightly OCD types. :D

As for finding the version number :o, my grandfather would have said "if that had teeth, it would have bitten you".

Honest, I have a brain, and it even works most of the time. :o

chaley 10-27-2010 04:42 AM

Could you give an example where it fails? By 'example', I mean a series of steps and some before and after values?

I ask because as dwanthny said, my 'fixes' affect bulk and template functions. The 'correct' title case function has been in edit metadata (single) for months (and it isn't alleged). Therefore either a) you have found another pathway to title case, b) you have a title that the function thinks it shouldn't change, of c) you are running a different calibre than the rest of the world.

ldolse 10-27-2010 05:27 AM

One edge case that gets me now and again is when I'm navigating the actual filesystem via CLI - it's that the Title Case changes only affect the DB - they don't change the original filename like other metadata edits do. However newly created/converted files follow the case changes. That leads to confusion when I'm using tab completion from the command line and not finding the specific version of the file I wanted.

Seanette 10-27-2010 10:30 AM

Quote:

Originally Posted by chaley (Post 1184342)
Could you give an example where it fails? By 'example', I mean a series of steps and some before and after values?

I ask because as dwanthny said, my 'fixes' affect bulk and template functions. The 'correct' title case function has been in edit metadata (single) for months (and it isn't alleged). Therefore either a) you have found another pathway to title case, b) you have a title that the function thinks it shouldn't change, of c) you are running a different calibre than the rest of the world.

At this point, I suspect it's a different pathway issue.

kovidgoyal 10-27-2010 11:01 AM

Quote:

Originally Posted by ldolse (Post 1184381)
One edge case that gets me now and again is when I'm navigating the actual filesystem via CLI - it's that the Title Case changes only affect the DB - they don't change the original filename like other metadata edits do. However newly created/converted files follow the case changes. That leads to confusion when I'm using tab completion from the command line and not finding the specific version of the file I wanted.

This will be on a case insensitive file system?

ldolse 10-27-2010 11:41 AM

Quote:

Originally Posted by kovidgoyal (Post 1184869)
This will be on a case insensitive file system?

No, I'm on OSX, case sensitive hfsplus. If it was case insensitive I don't think it would matter as the filenames would be equal regardless of case. I'm sure Windows users never notice this one.

It basically goes like this to be more clear. I add a book like this:
"this IS my test title.lit"

Tab completion works just by typing 't' in the directory and hitting tab.

After adding the book and editing metadata etc, Calibre will change the book title in the DB to something like this:
"This is my Test Title"

Since the title didn't change other than case the file isn't renamed.

Now if I convert the book to epub for example the new filename is:
"This is my Test Title.epub"

I'm often working with ebook-convert from the command line (but after I've done stuff from the GUI), and now tab completion doesn't work until I choose one case or the other(usually unconsciously) and then I spend a few seconds wondering why I get 'file not found' on whatever variant I thought I was converting from before realizing that I got bit by this behavior.

kovidgoyal 10-27-2010 11:52 AM

I can't replicate that behavior on case sensitive linux. If I change the case of a title, the folder the files are stored in as well as the files themselves are renamed with the new case.

I don't have a case sensitive OS X machine to test on, but as far as I know, there is no difference in the code path for OS X and linux.

ldolse 10-27-2010 12:00 PM

OK, well I've never looked into this in detail before, but I'll see if I missed something in how I'm doing it to myself (never worried about it much, but this thread prompted me to mention it).

When was this auto case changing function added? Would having books in the db from before the feature was added be part of it?


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.