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 01-05-2011, 04:58 PM   #1
tscamera
Enthusiast
tscamera began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Dec 2010
Device: PRS-650 ... ipad
Question [old thread] filename and library structure /author and titel structure

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)
tscamera is offline   Reply With Quote
Old 01-05-2011, 05:08 PM   #2
chaley
"chaley", not "charley"
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: 5,520
Karma: 855450
Join Date: Jan 2010
Location: France
Device: Many android devices
(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.
chaley is offline   Reply With Quote
 
Enthusiast
Old 01-05-2011, 07:26 PM   #3
tscamera
Enthusiast
tscamera began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Dec 2010
Device: PRS-650 ... ipad
Lightbulb got it!

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-
tscamera is offline   Reply With Quote
Old 05-31-2011, 05:03 PM   #4
b00sh
Junior Member
b00sh began at the beginning.
 
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.
b00sh is offline   Reply With Quote
Old 05-31-2011, 05:44 PM   #5
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,702
Karma: 5643657
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Moderator Notice
Moved older thread


Moderator Notice
See sticky in this sub-forum
theducks 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
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 the folder structure of 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


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


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