Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-25-2012, 09: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 10:43 AM.
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 10:02 AM   #2
theducks
Well trained by Cats
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: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
https://www.mobileread.com/forums/sho...d.php?t=119175
theducks is offline   Reply With Quote
Old 11-25-2012, 10: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, 10:21 AM   #4
theducks
Well trained by Cats
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: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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, 10: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 10:41 AM.
GarfieldKlon is offline   Reply With Quote
Old 11-25-2012, 11:04 AM   #6
theducks
Well trained by Cats
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: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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, 11:08 AM   #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, 11:52 AM   #8
theducks
Well trained by Cats
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: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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, 12: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, 04:38 PM   #10
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: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
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, 04: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, 05:07 PM   #12
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: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
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


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 authors and the folder structure brainvision Library Management 6 08-10-2012 08:42 AM
Folder Structure on Device laos369 Sony Reader Dev Corner 6 05-25-2012 11:23 PM
Folder structure an the reader thomasmorus Calibre 2 05-23-2010 07:51 PM
Folder structure doubt Oletros iRex 3 01-01-2009 07:00 AM
SD Folder structure ctitanic Amazon Kindle 1 12-30-2007 12:48 PM


All times are GMT -4. The time now is 11:31 PM.


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