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 03-13-2011, 11:21 PM   #16
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,409
Karma: 4132096
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
Thank you so much for the information! I have been working on this tonight and like having my new tree. I have a question though. What is the best way to have a book be in more than one hierarchy? For example, I have a large number of children's books. I want to separate them by both age and by genre. So, for example, the hierarchy would be something like this:

Children
---Young Readers
-------Genre A
-------Genre B
-------Genre C
---Middle Readers
-------Genre A
-------Genre B
-------Genre C
---Young Adult
-------Genre A
-------Genre B
-------Genre C

But let's say I want to do a search for all children's books in Genre A across all the age groups, or all books for young readers across all genres. I am just not sure what the best way to set all of this up should be. If I use the genre tag for Genre A, Genre B, Genre C etc. then how do I split them by age? Do I need a separate tag for that? And what if I have non-children books which are the same genre (for example, children's mystery novels and adult mystery novels). Is setting up the genre as 'children.mystery' going to exclude these books as part of a general search for mystery?

Right now, I have handled all my other genre tags and just lumped all the kids books in together, awaiting further info...
ficbot is offline   Reply With Quote
Old 03-14-2011, 07:43 AM   #17
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 ficbot View Post
[snip]
So, for example, the hierarchy would be something like this:

Children
---Young Readers
-------Genre A
-------Genre B
-------Genre C
---Middle Readers
-------Genre A
-------Genre B
-------Genre C
---Young Adult
-------Genre A
-------Genre B
-------Genre C

But let's say I want to do a search for all children's books in Genre A across all the age groups, or all books for young readers across all genres. I am just not sure what the best way to set all of this up should be.
If I use the genre tag for Genre A, Genre B, Genre C etc. then how do I split them by age? Do I need a separate tag for that? And what if I have non-children books which are the same genre (for example, children's mystery novels and adult mystery novels).
The issue you are facing is that your genres are not hierarchical. "Young Adult" and "A" are separate genres, or at least separate somethings. Each of words has meaning entirely independent of the other words. From the hierarchy point of view, all of 'Young Adult', 'A', 'A.Young Adult', and 'Young Adult.A' are valid. A hierarchy is stating that a word has meaning only in the context of some other word, which isn't your case.

From what you say, you want to have alternate organizations of independent information. This is one of the things user categories are good for. You would mark each book with the multiple genres it belongs in, some of which might be hierarchical, some (in your case most) not. You would then create several user categories to view the information in the ways you most commonly wish. Your example provides one, your text provides another.
Quote:
Is setting up the genre as 'children.mystery' going to exclude these books as part of a general search for mystery?
No. Searching for '#genre:mystery.' will find the word mystery no matter where it occurs in a hierarchy. Unfortunately, it will find all of 'mystery', 'english mystery', and 'vampire mystery'. There is currently no way to do an 'equals' search to match exactly some internal item in a hierarchy.

Reflecting a bit: It could be that the items (genres in this case) are 'mostly' hierarchical, in that the most common view is the one provided by the hierarchy. In this case, searching for an embedded item would be relatively uncommon. I can probably provide a search method to slice out embedded members of a hierarchy to remove the 'unfortunately' caveat above, probably something like #genre:=..mystery (note the second dot). However, I am reluctant to add these to the tag browser's 'click' searches, because doing so would increase the complexity of something that is already very complex. It would require two more 'states' (equals embedded and not equals embedded) in addition to the 5 that are already there. Opinions?
chaley is offline   Reply With Quote
Old 03-14-2011, 08:08 AM   #18
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
It is worth mentioing that you can always use compound terms in the search bar.
e.g.
item 'a' and item 'b' and not item 'c'
Search expressions you use a lot can then be saved under friendly names. I tend to use this approach rther than trying to set up any sort of rigid relationships.
itimpi is offline   Reply With Quote
Old 03-14-2011, 08:12 AM   #19
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 itimpi View Post
It is worth mentioing that you can always use compound terms in the search bar.
e.g.
item 'a' and item 'b' and not item 'c'
Search expressions you use a lot can then be saved under friendly names. I tend to use this approach rther than trying to set up any sort of rigid relationships.
In the next release, saved search names can also be hierarchical. If you have a lot of them, this might make them easier to organize/find.
chaley is offline   Reply With Quote
Old 03-14-2011, 10:17 AM   #20
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
Quote:
Originally Posted by chaley View Post
In the next release, saved search names can also be hierarchical. If you have a lot of them, this might make them easier to organize/find.
This will be great to have.
nynaevelan is offline   Reply With Quote
Old 03-14-2011, 12:31 PM   #21
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,409
Karma: 4132096
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
Thank you! That does help. What I have done is set up another custom column for 'collection' and put in main collection, children's collection, iPad collection, magazine collection. Then I set each of those as a saved search. So if I browse the entirety of the library, mystery will turn up the regular mysteries plus the kid ones. But if I restrict the view to only the kids library, then it will only show me the kid ones (and the tag browser will only show the tags which exist in that subset of the collection, e.g. if I have no children's non-fiction, that will not appear as a tag).
ficbot is offline   Reply With Quote
Old 03-18-2011, 12:19 AM   #22
MorWired
...
MorWired began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2011
Device: N/A
Text moved to a separate thread.

Last edited by MorWired; 03-18-2011 at 02:10 AM.
MorWired is offline   Reply With Quote
Old 01-04-2012, 09:11 AM   #23
Krogenar
It's Facebook!
Krogenar began at the beginning.
 
Krogenar's Avatar
 
Posts: 10
Karma: 10
Join Date: Jun 2011
Device: Nook Color
Looking for some advice.

I've implemented a hierarchical genre scheme as outlined in the OP, and I'm very happy with it. My setup follows these lines:

FICTION-
>SCIENCE-FICTION
>FANTASY
>CLASSICS
>ROMANCE

NON-FICTION-
>SCIENCE
>COOKING
>SELF-HELP

So my custom genre field is named '#genre' and contained values such as:

FICTION, FICTION.SCIENCE-FICTION, FICTION.CLASSICS

The above entry would be for a Jules Verne Omnibus.

I am using a Nook Color with a 32GB microSD and I would like to put a lot of book onto the reader, but organizing them is difficult. I would love to utilize the #genre column to make the 'Send to Device' to at least sort the books into directories representing their genres.

I realize that these directories would be under 'Books' in the 'My Files' directory, but I can't get the hang of having Calibre create the directory structure. Also, there's the issue of multiple copies of the books in cases where a book is listed under multiple genres. But I'm prepared to have multiple copies of the same book for those instances if there's no way around it.

So for the Jules Verne Omnibus, the 'Send to Device' might generate the following:

../BOOKS/FICTION/SCIENCE-FICTION/JULES, VERNE/Jules-Verne-Omnibus.epub
../BOOKS/FICTION/CLASSICS/JULES, VERNE/Jules-Verne-Omnibus.epub

Is this result possible using the subitems function? Is anyone aware of some way of avoiding the duplication? Any advice or help would be greatly appreciated. Even just getting the books to sort into merely FICTION or NON-FICTION directories would be an improvement.

Last edited by Krogenar; 01-04-2012 at 09:13 AM. Reason: make hierarchy more apparent.
Krogenar is offline   Reply With Quote
Old 01-04-2012, 01:55 PM   #24
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 Krogenar View Post
...but I can't get the hang of having Calibre create the directory structure. Also, there's the issue of multiple copies of the books in cases where a book is listed under multiple genres. But I'm prepared to have multiple copies of the same book for those instances if there's no way around it.

So for the Jules Verne Omnibus, the 'Send to Device' might generate the following:

../BOOKS/FICTION/SCIENCE-FICTION/JULES, VERNE/Jules-Verne-Omnibus.epub
../BOOKS/FICTION/CLASSICS/JULES, VERNE/Jules-Verne-Omnibus.epub

Is this result possible using the subitems function? Is anyone aware of some way of avoiding the duplication? Any advice or help would be greatly appreciated.
You cannot create more than one path for a given book within one save operation. The only way to create the duplicates is to do multiple save operations using different templates.

You can do this sort of thing with Sony collections, but to the best of my knowledge the Nook Color does not support something equivalent.
Quote:
Even just getting the books to sort into merely FICTION or NON-FICTION directories would be an improvement.
If you can guarantee that a book never appears in more than one top-level genre, then the following template will do it.
Code:
{#genre:subitems(0,1)||/}{author}/{title}
However, if it is possible that a book can have more than one top-level genre, such as Japanese.History and Military.History, then the above template will produce "Japanese, Military". This may or may not be what you want.

In the end, you need to decide what you want for all the possible cases, taking into account how your data will evolve. It may turn out that the simplest thing to do is to add another column (text, not tags-like) in which you manually enter the folder name to be used on the device.
chaley is offline   Reply With Quote
Old 01-04-2012, 03:41 PM   #25
Krogenar
It's Facebook!
Krogenar began at the beginning.
 
Krogenar's Avatar
 
Posts: 10
Karma: 10
Join Date: Jun 2011
Device: Nook Color
Chaley, thanks for your help!

Quote:
Originally Posted by chaley View Post
You cannot create more than one path for a given book within one save operation. The only way to create the duplicates is to do multiple save operations using different templates.
Ok.

Quote:
Originally Posted by chaley
If you can guarantee that a book never appears in more than one top-level genre, then the following template will do it.
Code:
{#genre:subitems(0,1)||/}{author}/{title}
However, if it is possible that a book can have more than one top-level genre, such as Japanese.History and Military.History, then the above template will produce "Japanese, Military". This may or may not be what you want.
The genre field always contains at least the term 'FICTION' or 'NON-FICTION' but never both.

Quote:
Originally Posted by chaley
It may turn out that the simplest thing to do is to add another column (text, not tags-like) in which you manually enter the folder name to be used on the device.
Here's what I've tried to do. I've created a derived column called 'directories' and decided that if the books go just one sublevel down (i.e.: FICTION.HORROR would send to /BOOKS/FICTION/HORROR/) that would be acceptable. So I figured if I could get the 'directories' field to list just one level below either FICTION or NON-FICTION it would still be a great benefit.

My template for 'directories' column is:

Code:
{#genre:sublist(0,1,\,)}
I noticed that the 'genres' column is always alphabetically sorted, starting with one of the top two hierarchy terms (FICTION or NON-FICTION), and then lists the second tier terms alphabetically, and then deeper hierarchies.

Example:
Code:
FICTION, FICTION.HORROR, FICTION.THRILLER, FICTION.THRILLER.MEDICAL
So my plan was to grab the second item in the list, so that the 'directories' column would read"
Code:
FICTION.HORROR
Then all I would have to do is figure out a way to convert the period (.) into a slash (/) and I could use that field in my 'Send to Device' templates. Not perfect, but good enough!

But there's a complication (aside from my not knowing how to replace the periods yet.) -- when Calibre displays the contents of the 'genres' field in the tableview, it sorts them alphabetically... but the field contents may not be in the same order. When this programming grabs the second term in the string, it grabs not from the column, but from the actual field contents.

Now, I see that there are functions to sort strings, so I could sort the 'genre' string and then grab the second term, but how can I nest commands? Can I?

Again, thanks for the help.
Krogenar is offline   Reply With Quote
Old 01-04-2012, 04:14 PM   #26
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
It seems that you are saying that:
- A book has zero genre values, or 2 or more genre values.
- If a book has a genre value, the first is either FICTION or NONFICTION, and all subsequent values begin with that value.
- If a book has no genre values, then you want an empty value.
- If a book has genre values, then you want the second value in the sorted list.

If the above is true, then this template gives you the value you want.
Code:
{#genre:'re(cmp(count($, ','), 1, '', $,  sublist(list_sort($, '0', ','), 1, 2, ',')), '\.', '/')'||/}{author}/{title}
The template uses template program mode, which permits nesting of function calls. The outermost function, re, operates on the return value of 'cmp', converting all periods to slashes. The cmp function checks the length of the genre list. If it is less than 1, it returns the empty string. If it is equal to 1 (a case that shouldn't happen according to my understanding of the rules), it returns the single value. If it is longer than 1, it sorts the list and returns the second value.
chaley is offline   Reply With Quote
Old 01-04-2012, 07:21 PM   #27
Krogenar
It's Facebook!
Krogenar began at the beginning.
 
Krogenar's Avatar
 
Posts: 10
Karma: 10
Join Date: Jun 2011
Device: Nook Color
Quote:
Originally Posted by chaley View Post
It seems that you are saying that:
- A book has zero genre values, or 2 or more genre values.
- If a book has a genre value, the first is either FICTION or NONFICTION, and all subsequent values begin with that value.
- If a book has no genre values, then you want an empty value.
- If a book has genre values, then you want the second value in the sorted list.

If the above is true, then this template gives you the value you want.
Code:
{#genre:'re(cmp(count($, ','), 1, '', $,  sublist(list_sort($, '0', ','), 1, 2, ',')), '\.', '/')'||/}{author}/{title}
The template uses template program mode, which permits nesting of function calls. The outermost function, re, operates on the return value of 'cmp', converting all periods to slashes. The cmp function checks the length of the genre list. If it is less than 1, it returns the empty string. If it is equal to 1 (a case that shouldn't happen according to my understanding of the rules), it returns the single value. If it is longer than 1, it sorts the list and returns the second value.
I'm still testing it out, but it seems like you've done it! Thank you so much! Now I just have to tweeze apart what you've written so I can help myself out next time. Thank you. Thank you. Thank you.
Krogenar is offline   Reply With Quote
Old 01-04-2012, 09:19 PM   #28
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,409
Karma: 4132096
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
You might also consider using a mixture of tags and custom fields. For example, I wanted to create a sub-set of Jewish-themed books. Rather than going through and creating umpteen sub-genres (Jewish.Fiction, Jewish.Biography, Jewish.Fiction etc) I just used a tag instead of the custom genre field. Now, I can do a search for the tag 'Jewish' and then use the 'restrict to...' dialog box to limit my list view to just that set. When I go to the side-bar, I can see all my genres (fiction, non-fiction etc.) and see which books they contain.
ficbot 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
Examples of Subgroups emonti8384 Lounge 32 02-26-2011 06:00 PM
Noob import question - adding books by genre, ln, fn . . . deleteriousone Library Management 16 02-16-2011 05:55 AM
Managing iPad books HowardBrazee Apple Devices 12 10-19-2010 05:46 AM
Managing your library or how you consume books pwalker8 General Discussions 37 09-02-2010 07:58 AM
Using Genre to sort books when saving to device or disk jjchico Calibre 2 07-07-2010 12:27 PM


All times are GMT -4. The time now is 08:52 AM.


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