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 Today, 06:46 PM   #1
foosion
Groupie
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 182
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Pick a random book?

I'd like to create something that goes through all of my Calibre books, finds those that have the onkobo column checked but doesn't have a date in the finished column, then choose one at random.

Something like:

Code:
import random

unfinished = [book for books if book.onkobo and not book.finished]
book = random.choice(unfinished)
show(book.title, book.author)
How would I do this?
foosion is offline   Reply With Quote
Old Today, 07:33 PM   #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: 30,225
Karma: 57978960
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I have a VL for 'To Read'
Code:
Not #finished:>12/31/2000 and formats:true and not formats:other and not #usertags:split_up
finished is a date (2000 is my abandoned date)
usertags is what it says , I tag there when I use Epub Split (PI) on a boxed set
So, if it has a format and not fand any of the other, it represents my (outta control) TBR pile
Once that VL is active, you just use the dice Icon (select a Random Book)
Note: You may need to add it to a toolbar
theducks is offline   Reply With Quote
Old Today, 07:49 PM   #3
foosion
Groupie
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 182
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Goes off to figure out virtual libraries.



I like the idea of tracking abandoned books.
foosion is offline   Reply With Quote
Old Today, 07:55 PM   #4
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,891
Karma: 226731282
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by foosion View Post
Goes off to figure out virtual libraries.



I like the idea of tracking abandoned books.
You can also use saved searches instead of virtual libraries.

Based on your post, it would be something like #onkobo:true and #finished:false
Sirtel is online now   Reply With Quote
Old Today, 08:31 PM   #5
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: 30,225
Karma: 57978960
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The reason I prefer VL's is because you can use them in conjunction with the Tag Browser.
Show To Read and filter by Science Fiction
theducks is offline   Reply With Quote
Old Today, 09:20 PM   #6
foosion
Groupie
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 182
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Sirtel View Post
You can also use saved searches instead of virtual libraries.

Based on your post, it would be something like #onkobo:true and #finished:false
Even simpler.


Last edited by foosion; Today at 09:29 PM.
foosion is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to assign Pick a Random Book to a keyboard combination? jamesgl Calibre 3 05-14-2022 05:54 PM
Pick multiple random books? BookJunkieLI Library Management 5 05-24-2020 11:10 AM
"Pick Random Book" - not so random?? Chris_Snow Library Management 3 09-15-2013 06:44 PM
Adding "Pick a Random Book" in Sharing over the net ippopom Recipes 2 01-13-2013 04:32 AM
Do you pick the book first or do you look for books available on your device? Bob Russell Which one should I buy? 21 09-08-2008 12:34 PM


All times are GMT -4. The time now is 09:34 PM.


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