|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Dec 2010
Device: PRS-650 ... ipad
|
![]()
i am trying, yes i'm trying...
but. this is my filename: name, prename - title - title extra.ext what do i have to do, tweaking .py etcpp to get: I. name, prename to metadata authors... as it is: name, prename. II. title - title extra to metadata title... as it is: title - title extra. III. the same structure to the library, {authors}/{title}/{authors} - {title} i tried to tweak the global.py with: filename_pattern = u'(?P<author>[^_]+) - (?P<title>.+)' and the save_to_disk.py with: template = u'{authors}/{title}/{authors} - {title}' but as long as calibre imports the file und puts -prename name- as authors and -cutted filename- in the metadata (what i dont like..), the filestructure in the library looks like: prename name/title/title - prename name.ext WHATs the trick? shall i tweak the gui.py too? +how can i change the (_) to (,) please help, i don't get it (all) |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,322
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
(confusion) Are you changing the python files? Why? Isn't it enough to change the regexps in the preferences?
Regarding III: you have no control over how calibre stores files in the library, unless you rewrite a lot of the code in library.database2.py. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Dec 2010
Device: PRS-650 ... ipad
|
![]()
concerning add I and add II:
tweaking the global.py works as described and wanted, if: read_file_metadata = False then calibre will read the filename and: filename_pattern = u'(?P<author>[^_]+) - (?P<title>.+)' will work! - with extended filenames too (author - filename - notes.ext) unfortunatly i used a word-produced .rtf and the properties where filled with an author in the format: prename name (pn ln). am i stupid! i didn't even know that a .rtf can carry metadata. now i know! thanks for pushing me to the regex tweaks in the prefs, copy author to author_sort value is: comma great! the save_to_disk.py tweak, as described before, works perfectly. but just for -save to disk-, naturally. add III: i thinks i can live with it, cause of the add I+II solutions. now the file structure is simular to the imported filename. just the filename itself is vis versa (fn - pn, ln.ext) you say, there is a lot of code to modify... i'm nosy. to whom it may concern: i try to keep my workflow simple. if i'm working on different versions of an e-book, i'm just saving under different/extended filenames, importing... that's it. no hustle with overwriting older version. an than all my files should have the same syntax: ln, pn - fn.ext calibre now (then) holds it all. Last edited by tscamera; 01-05-2011 at 07:56 PM. Reason: if there is a -why- |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: May 2011
Device: NookColor & Nook Classic
|
I hope bumping a thread this old isn't a big deal, but I'm pretty sure this is where I need to be.
TL;DR : I'd like to change how Calibre stores books in my library. Long version : I am running into an issue with paths and filenames being longer than 260 characters. I have my "save to disk" option as '{authors}/{title}/{title}' (although I may go back to '{author_sort}/{title}/{title})'. When I save to a backup folder, it saves as, within an "author_sort/title" folder structure '[title].epub / .oxf / .jpg I have my "send to device" as '{author_sort}/{title}'. It saves the same as saving a backup. Now, in "Adding Books", whether I have '(?P<title>.+)' or '(?P<title>.+) - (?P<author>[^_]+)', my EPUBS are always named, within an "author_sort/title" folder structure '[title] - [Author_Sort].epub'. How do I drop that last "author_sort" from my .epub name? I don't need it there as I know the Author from the folder structure I am in. It seems as though it isn't possible without a lot of Python re-writing. I'm up for it. It just seems like this would be a good thing to add into the options. Some people just don't need the Author's name and the book title listed over and over again in the same filename and path. |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,887
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice Moved older thread Moderator Notice
See sticky in this sub-forum |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
eDGe Library files and backup structure | ken_jennings | enTourage eDGe | 9 | 07-08-2011 10:16 AM |
What structure do you use? | crich70 | Writers' Corner | 14 | 05-24-2011 04:25 PM |
Changing the Library Structure? | Logan06 | Library Management | 13 | 04-26-2011 09:22 PM |
Want to change folder structure or file names in the Calibre library? | Manichean | Library Management | 0 | 01-30-2011 10:51 AM |
Thread-Titel ändern | ThR | Erste Hilfe | 6 | 04-29-2009 05:52 AM |