Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2018, 06:44 AM   #1
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
Stuck with building KOBO shelves...

Hello everyone.

I'm reading this forum since 2014 and using Calibre ( thanks Kovid, saved my life!)

I'm bothering you since I have a problem and, even if I tried, I didn't succeed...
(Please pardon me if the section is wrong..)

First: Till now, my shelf name is based on Series'name and, if this is absent, author name.

( that is: I want all the books in a serie in the same shelf, otherwise grouped by author)

Recently I introduced Tags, since I'm started using Calibre to manage pdf manuals (Arduino, Electronics....)

Hence, when creating the Shelf name I need:
1) Shelf name is given by Series name and, if absent, Author name. ( already done!)
2) if Tag is not empty, prefix the shelf column with the Tags value, or better, a given string.
( Given I keep the manuals on the top of the list, I'd like to have:
__ Arduino books
__ Electronics books
__ Other manuals..
then the other books, listed normally.

Thanks for your patience....
Regards.
lucone is offline   Reply With Quote
Old 04-09-2018, 04:45 AM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,289
Karma: 8142344
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu LTS, Android, Bouye Likebook Plus
You might want to investigate virtual libraries. Then you can have one virtual library for each "shelf". And tabs for each shelf for fast and easy access.

Virtual libraries are based on searches. For instance a search for "Arduino" in tags. Or something much more complex.

Then, when you click on the "Arduino" tab, you see all your books with "Arduino" somewhere in the tags.

You could have a virtual library each for Arduino, Electronics, Programming, Manuals, Math, Fantasy, Science Fiction, Fiction and so on. Some books may be in more than one virtual library. For instance a book with the two tags "Arduino" and "Electronics".

https://manual.calibre-ebook.com/virtual_libraries.html
Adoby is offline   Reply With Quote
Advert
Old 04-09-2018, 05:02 AM   #3
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
Adoby, thanks for your response, but Calibre is not the problem.

Seems I didn't explained my problem correctly, due my poor english.

I was speaking about a column, which content it will be used to create shelves on my kobo....

Regards
Luca
lucone is offline   Reply With Quote
Old 04-09-2018, 06:37 AM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 10,321
Karma: 10563064
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by lucone View Post
Adoby, thanks for your response, but Calibre is not the problem.

Seems I didn't explained my problem correctly, due my poor english.

I was speaking about a column, which content it will be used to create shelves on my kobo....

Regards
Luca
@lucone - following on from Adoby's suggestion, try using the virtual_libraries() function in a composite column and then use that column to create the kobo shelves. I don't have a Kobo so I have no idea if this will work.

Moderator Notice
PS : I tweaked your thread title to make it clear you're referring to KOBO shelves


BR

Last edited by BetterRed; 04-09-2018 at 06:41 AM. Reason: insert PS
BetterRed is offline   Reply With Quote
Old 04-09-2018, 06:42 AM   #5
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
OK, Thanks a lot!
lucone is offline   Reply With Quote
Advert
Old 04-09-2018, 09:31 AM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 14,738
Karma: 24696650
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
@lucone: Your first post made me think you were asking about collections for a Kobo device, but you didn't mention the device or have it listed in your profile, so I assumed it was something else.

The suggestion to use a custom column is probably the way to go. I'm not sure exactly what it should look like. How do you do your current collections?

Also, don't forget a book can be in multiple collections. So, you can have them in both a series collection and the tag-based collection. And if you using a Kobo firmware from the last year or so, having author collection isn't needed. The Authors list works well for this.
davidfor is offline   Reply With Quote
Old 04-09-2018, 09:45 AM   #7
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
Yeah, Author collection is ok
But I want to keep series and authors separeted, so Author shelves are prefixed by "__ Author"

given that
seriesPre = series.ifempty('__ Author' + field{Author})

What I want is a collection field that fullfill this rule:
IF tag == 'ELECTRONICS':
->series = '__ Electronics'
elif tag == 'HISTORY':
->series = '__ HISTO ' + {#seriesPre}
...

Hope is more clear...
lucone is offline   Reply With Quote
Old 04-11-2018, 02:51 AM   #8
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 14,738
Karma: 24696650
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
Quote:
Originally Posted by lucone View Post
Yeah, Author collection is ok
But I want to keep series and authors separeted, so Author shelves are prefixed by "__ Author"
I think you misunderstood me, but it might depend on what firmware version you are running. As of firmware version 4.4.9298, there is a separate "Authors" list. This is a list of all the authors with the number of books by that author. It has several ways to order the list. Tapping an author displays the books for that author. With this feature, I think that adding collections for the authors is a wasted effort and just clutters the collections list.
Quote:
given that
seriesPre = series.ifempty('__ Author' + field{Author})

What I want is a collection field that fullfill this rule:
IF tag == 'ELECTRONICS':
->series = '__ Electronics'
elif tag == 'HISTORY':
->series = '__ HISTO ' + {#seriesPre}
...

Hope is more clear...
Sorry, it isn't completely clear. For one thing, I can't tell if you want a single collection name returned, or multiple. And I'm not sure if having a series overrides everything else.

But, the following will get you somewhere close to what I think you want.

Code:
program:
test(
	field('series'),
	field('series'),
	test(
		in_list(field('tags'), ',', 'Science Fiction', 'SciFi', 'Fantasy', 'isfantasy', ''),
		in_list(field('tags'), ',', 'Science Fiction', 'SciFi', 'Fantasy', 'isfantasy', 'should never happen'),
		ifempty(field('series'), strcat( '__ Author - ', field('authors')))
	)
);
That will return one collection name. This will be:
- The series name if it exists
- "SciFi" if the tags has "Science Fiction" or "isfantasy" if tags has "Fantasy".
- And "__Author - {authors}" if none of the above.

This is using tags that are in my test library rather than yours. And I haven't done anything equivalent to what you want for the tag "History". But, that is an easy addition.
davidfor is offline   Reply With Quote
Old 04-11-2018, 05:44 AM   #9
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
@davidfor:
First of all thanks for the code, it's what I was trying to do!

Regarding authors "series": I want to keep books belonging to a series in a shelf and the books "singleton" in another container.



Again, thanks!!!
lucone is offline   Reply With Quote
Old 04-11-2018, 06:02 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 14,738
Karma: 24696650
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
Quote:
Originally Posted by lucone View Post
@davidfor:
First of all thanks for the code, it's what I was trying to do!
Good to hear.
Quote:
Regarding authors "series": I want to keep books belonging to a series in a shelf and the books "singleton" in another container.
I suppose the problem is that I just don't see the point. A collection for a series, I can see. But, I can't see any reason to separate the non-series books from the series books. Especially as there is an automatic authors list.
davidfor is offline   Reply With Quote
Old 04-11-2018, 06:13 PM   #11
lucone
Member
lucone began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Feb 2010
Location: Milano, Italy
Device: IREX DR1000s, Kobo Aura H20
OK, I ( All thanks to davidfor, of course) did it.

This is the template:

Code:
{series:' first_non_empty(
                  in_list(field('tags'), ',', 
                            'Android', '__ Android', 
                            'Arduino', '__ Arduino', 
                            'Elettronica', '__ Elettronica',
'Elettronica', '__ Elettronica',
                            'Light Novel', strcat('__ LN ' , field('series')),
                          ''),                  
                  field('series'),
                  strcat('__Autore: ', re( re( field ('author_sort'), ",", " "), '_', '' ))
                )
       ;'}
Let me bore you for a while. trying to explain this template.
1) If book subject is Android, Arduino or Electronics (I'm italian, yesss), don't care about author or series put it in the shelf ( Android, Arduino or Elettronica)

2) If the book is a japanese light novel, I want to keep this series separated from "normal" books ( say, Aubrey & Maturin, Nero Wolfe, Sherlock Holmes etc), so the shelf is given by series name prefixed by __ LN{space}

3) If the book don't have any of the tags above described, well, if it is part of a series, put into the series shelf,

4) Otherwise, put it into the Author shelf

The underscores keeps the shelfes ordered alphabetically and "singletons" are kept in this way since I'm very, very lazy and, davidfor, in Author lists are present ALL the books belonging to the author, including the books that belong to some series.

However, Thanks very very much to all of you!
@davidfor: if you, by any chance, come by Milan, let me know!

Regards.
lucone 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
Creating Shelves in Kobo Larla Library Management 3 07-13-2016 06:48 PM
Kobo Shelves JDesat Library Management 1 09-08-2014 03:38 PM
Using Kobo Shelves Agama Kobo Reader 4 10-29-2013 02:28 PM
Shelves on kobo glo Shardancalibre Kobo Reader 5 02-04-2013 12:22 PM
Will Kobo ever get collections/shelves?? MrsJoseph Kobo Reader 27 11-07-2011 11:58 AM


All times are GMT -4. The time now is 03:13 AM.


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