Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-22-2012, 09:47 AM   #1
Kralik
Guru
Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.
 
Posts: 609
Karma: 1013897
Join Date: Jul 2009
Device: Rooted NST
Frustrated with commas when saving/sending

For reference: I use a rooted NST with ReLaunch as my file manager. It displays simple folders and filenames. And I LOVE Calibre. Awesome work.

I've been having problems getting filenames to save correctly when I either save to disk or send to my device. Let's say I have a book named "The Librarian". The title sort is then "Librarian, The". When I save it to disk with the {title} field, it instead uses the title sort with the comma. Yuck--I'd really prefer to see the title as normal when I browse for it. Hmmm... after much searching and delving through the Calibre documentation, I discovered swap_around_commas(). Yay! So I set it up and it fixed that problem... while introducing another. Any title with a comma in it is mixed up, such as:

"I, Robot" ==> "Robot I"
"Miles, Mystery and Mayhem" ==> "Mystery and Mayhem Miles"

Ugh, not good. After searching these forums I finally stumbled upon another piece of the puzzle: tweaks.py. I set save_template_title_series_sorting = 'strictly_alphabetic' and found that it solved the "Librarian, The" problem I had earlier. But... it didn't fix the problem with commas in titles. I've tried with and without swap_around_commas(). Sigh...

Is there any way to have Calibre save the files with exactly what is in the title field, no more, no less? Why does it insist on moving things around when I explicitly state I want the {title}?
Kralik is offline   Reply With Quote
Old 05-22-2012, 09:48 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Preferences->Tweaks->Control formatting of title and series in templates
kovidgoyal is offline   Reply With Quote
Advert
Old 05-22-2012, 10:19 AM   #3
Kralik
Guru
Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.
 
Posts: 609
Karma: 1013897
Join Date: Jul 2009
Device: Rooted NST
Quote:
Originally Posted by kovidgoyal View Post
Preferences->Tweaks->Control formatting of title and series in templates
Honored to receive a dev response!

That seems to be the same setting I had tried already, namely:

save_template_title_series_sorting = 'strictly_alphabetic'

Which fixed titles changing from "The Librarian" to "Librarian, The" but didn't work with titles that already had commas like "I, Robot"
Kralik is offline   Reply With Quote
Old 05-22-2012, 12:37 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use that tweak and then dont use any functions in your templates. Or as the comment of that tweak says, use the raw_field() functions.
kovidgoyal is offline   Reply With Quote
Old 05-22-2012, 06:19 PM   #5
Kralik
Guru
Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.Kralik ought to be getting tired of karma fortunes by now.
 
Posts: 609
Karma: 1013897
Join Date: Jul 2009
Device: Rooted NST
Thank you, I got it to work!
Kralik is offline   Reply With Quote
Advert
Old 07-24-2012, 06:11 PM   #6
HarleyPixie
Junior Member
HarleyPixie began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2012
Device: Nook Simple Touch
Mind explaining exactly how you got this to work? I've tried every way i could think of to get the function to work and can't.


Seems to me it would just make more sense and be simpler if the {title}/{series} and {title_sort}/{series_sort} were seperate options, like the {authors} and {authors_sort} already are. This really shouldn't be such a complicated option.
HarleyPixie is offline   Reply With Quote
Old 07-25-2012, 04:13 PM   #7
HarleyPixie
Junior Member
HarleyPixie began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2012
Device: Nook Simple Touch
Sigh. Well, I think I figured out from another thread about timestamps how to use the raw_field.. {:'raw_field('series')'} .. now the problem is that if there is no series, it puts "none" in its place instead, which is annoying.

HarleyPixie is offline   Reply With Quote
Old 07-25-2012, 04:34 PM   #8
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: 12,343
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@HarleyPixie: would you tell us what you are trying to do? Unless you are doing something very unusual, I can't see any reason why you should be futzing with raw_field and swap_around_comma instead of using the tweak described in post #2.

To be precise, the tweak is "Control formatting of title and series when used in templates" (search for save_template_title_series_sorting)
chaley 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
Losing files when saving saving to disk theaccountant Library Management 4 03-10-2011 02:38 PM
Journal Not Saving Writing When Moving to a New Page or Saving it eberhardt333 enTourage Archive 5 11-24-2010 12:47 AM
Seriously thoughtful What about commas? GraceKrispy Lounge 115 10-18-2010 10:19 PM
mobi-meta changes commas to semicolons GRiker Calibre 7 04-30-2009 05:38 AM
Commas in LRF metadata kevin_boone Calibre 22 02-12-2009 01:39 PM


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


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