![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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}? ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Preferences->Tweaks->Control formatting of title and series in templates
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 609
Karma: 1013897
Join Date: Jul 2009
Device: Rooted NST
|
Quote:
![]() 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" |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 609
Karma: 1013897
Join Date: Jul 2009
Device: Rooted NST
|
Thank you, I got it to work!
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() 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.
![]() ![]() |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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) |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
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 |