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 11-25-2012, 10:56 AM   #1
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
Custom folder structure on 'save to disk'

Hi

I'm using Calibre 0.9.7 since two or three days. Calibre use the authors and the book title for the folder structure.

Is there a way to tell Calibre to use a custom metadata field as structure? I've added #genre and I would prefer this.


greez
GarfieldKlon

Last edited by GarfieldKlon; 11-25-2012 at 11:43 AM.
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 11:02 AM   #2
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: 15,059
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
http://www.mobileread.com/forums/sho...d.php?t=119175
theducks is offline   Reply With Quote
Old 11-25-2012, 11:15 AM   #3
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
I've already read this and I'm configuring the 'save to disk'. I set genre like this --> 'IT.Programming.Java'. If I export it with {#genre}/{title}/{title} I'm ending up with a folder calld 'IT.Programming.Java' ...

But I want a single folder for each genre, a folder 'IT', and in there a folder 'Programming' and so on. Isn't this possible?
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 11:21 AM   #4
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: 15,059
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by GarfieldKlon View Post
I've already read this and I'm configuring the 'save to disk'. I set genre like this --> 'IT.Programming.Java'. If I export it with {#genre}/{title}/{title} I'm ending up with a folder calld 'IT.Programming.Java' ...

But I want a single folder for each genre, a folder 'IT', and in there a folder 'Programming' and so on. Isn't this possible?
STD is for EXPORT (to reader devices)
You will really farkle your library if you write into it.
theducks is offline   Reply With Quote
Old 11-25-2012, 11:28 AM   #5
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
I don't want to write into the calibre folder structure, I just want to export my books somewhere else with my own defined logic.

I think this could be the solution:
sublist(val, start_index, end_index, separator)

edit:
Ok here's something ugly, but it works:
{#genre:subitems(0,1)}/{#genre:subitems(1,2)}/{#genre:subitems(2,3)}/{#genre:subitems(3,4)}/{#genre:subitems(4,5)}/{title}/{title}

I don't know how to dynamically create the folder structure.

Last edited by GarfieldKlon; 11-25-2012 at 11:41 AM.
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 12:04 PM   #6
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: 15,059
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by GarfieldKlon View Post
I don't want to write into the calibre folder structure, I just want to export my books somewhere else with my own defined logic.

I think this could be the solution:
sublist(val, start_index, end_index, separator)

edit:
Ok here's something ugly, but it works:
{#genre:subitems(0,1)}/{#genre:subitems(1,2)}/{#genre:subitems(2,3)}/{#genre:subitems(3,4)}/{#genre:subitems(4,5)}/{title}/{title}

I don't know how to dynamically create the folder structure.
I see a 7 folder Deep (from the base folder) structure there.
ALL Folders (paths) will be created as needed
theducks is offline   Reply With Quote
Old 11-25-2012, 12:08 PM   #7
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
Exactly, what's so scary about that? Can I do this more generically?
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 12:52 PM   #8
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: 15,059
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by GarfieldKlon View Post
Exactly, what's so scary about that? Can I do this more generically?
Windows Will fail on long path names
theducks is offline   Reply With Quote
Old 11-25-2012, 01:06 PM   #9
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
Long path names aren't the same as a deep directory structure. The directories itselves are each shorter than 20 characters.
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 05:38 PM   #10
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,788
Karma: 1212788
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by GarfieldKlon View Post
I don't want to write into the calibre folder structure, I just want to export my books somewhere else with my own defined logic.

I think this could be the solution:
sublist(val, start_index, end_index, separator)

edit:
Ok here's something ugly, but it works:
{#genre:subitems(0,1)}/{#genre:subitems(1,2)}/{#genre:subitems(2,3)}/{#genre:subitems(3,4)}/{#genre:subitems(4,5)}/{title}/{title}

I don't know how to dynamically create the folder structure.
Try the template
Code:
{#genre:re(\.,/)}
This will make a folder structure out of the genres as long as there is only one genre associated with a book.
chaley is offline   Reply With Quote
Old 11-27-2012, 05:09 PM   #11
GarfieldKlon
Junior Member
GarfieldKlon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2012
Device: iPad 4th
@Chaley
THX! It works great. Could you please explain it to me what re does? Or give me a link, I haven't found it in the help, just examples with no explanation.
GarfieldKlon is offline   Reply With Quote
Old 11-27-2012, 06:07 PM   #12
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,788
Karma: 1212788
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by GarfieldKlon View Post
@Chaley
THX! It works great. Could you please explain it to me what re does? Or give me a link, I haven't found it in the help, just examples with no explanation.
The re function applies a regular expression to the current field. The "re" function's syntax and intended effect is documented in Using functions in templates - single-function mode.

A good regular expression tutorial is here: All about using regular expressions in calibre.
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
2 authors and the folder structure brainvision Library Management 6 08-10-2012 09:42 AM
Folder Structure on Device laos369 Sony Reader Dev Corner 6 05-26-2012 12:23 AM
Folder structure an the reader thomasmorus Calibre 2 05-23-2010 08:51 PM
Folder structure doubt Oletros iRex 3 01-01-2009 08:00 AM
SD Folder structure ctitanic Amazon Kindle 1 12-30-2007 01:48 PM


All times are GMT -4. The time now is 09:50 AM.


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