Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-21-2011, 12:44 PM   #1
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
calibre-server --restriction

Help, please! Couldn't quite figure out the syntax for the --restriction option in calibre-server command line.

I've tried all of the following and I get the same WARNING: Content server: search restriction does not exist message:

--restriction *formats:"=MOBI"
--restriction formats:"=MOBI"
--restriction format:"=MOBI"
--restriction "formats:=MOBI"
--restriction "format:=MOBI"
--restriction formats:mobi
--restriction format:mobi
--restriction="formats:mobi"
--restriction="format:mobi"


Help?
ilovejedd is offline   Reply With Quote
Old 09-21-2011, 12:50 PM   #2
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: 12,354
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The argument to restriction must be an already-existing saved search, not the search query itself.

The easiest way to create a saved search is to use the GUI, but you can also create a saved search with the calibredb saved_searches command
chaley is offline   Reply With Quote
Advert
Old 09-21-2011, 01:08 PM   #3
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Gotcha. Thanks! Looks like that actually makes my life easier. I can use easier naming for the restrictions (e.g. kindle, stanza, unread, etc). Hmm, is it possible to use more than one saved search at the same time?

Thanks again!
ilovejedd is offline   Reply With Quote
Old 09-21-2011, 01:13 PM   #4
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: 12,354
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ilovejedd View Post
Hmm, is it possible to use more than one saved search at the same time?
An instance of the content server can use only one restriction. However, you can have multiple instances of the content server on different ports. That would permit you to use different restrictions. If you set different passwords, then you can control who uses which instance.

If you are talking about the GUI, then "sort of". You can use one saved search as the restriction and another in the search box.
chaley is offline   Reply With Quote
Old 09-21-2011, 01:43 PM   #5
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,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
The saved search used as a restriction is not limited in complexity so you can apply a compund set of criteria. Not sure if that was what you were looking for?
itimpi is offline   Reply With Quote
Advert
Old 09-21-2011, 01:56 PM   #6
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by chaley View Post
An instance of the content server can use only one restriction. However, you can have multiple instances of the content server on different ports. That would permit you to use different restrictions.
I'm already running multiple instances of the server on different ports. However, it would have been nice if I can use, say --restriction "kindle AND favorites" which will return all ebooks available in MOBI format and tagged as Favorite instead of having to creating a separate saved search entry for each one: kindle, favorites, kindle favorites.

Anyway, thanks for the help!

By the way, I noticed a bug with calibre-server when using the --url-prefix option. If there's only one item in the Authors, Languages, Publishers and Tags categories, clicking on the links would result in a 404 error due to the duplication of the url-prefix: e.g.

Quote:
404 Not Found

The path '/calibre/calibre/browse/matches/publisher/1' was not found.

Code:
Traceback (most recent call last):
  File "site-packages\cherrypy\_cprequest.py", line 606, in respond
  File "site-packages\cherrypy\_cperror.py", line 227, in __call__
NotFound: (404, "The path '/calibre/calibre/browse/matches/publisher/1' was not found.")
Manually typing the correct url in the address bar (e.g. http://localhost:8080/calibre/browse/matches/publisher/1) loads the correct page so I think this might be due to a javascript issue.
ilovejedd is offline   Reply With Quote
Old 09-21-2011, 04:21 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,233
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ilovejedd View Post
By the way, I noticed a bug with calibre-server when using the --url-prefix option. If there's only one item in the Authors, Languages, Publishers and Tags categories, clicking on the links would result in a 404 error due to the duplication of the url-prefix: e.g.
Fixed. And you can have your saved search search for kindle AND favorites (or indeed any arbitrarily complex search taht you can dream up)
kovidgoyal is offline   Reply With Quote
Old 09-21-2011, 05:40 PM   #8
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by kovidgoyal View Post
Fixed.
Thanks!
Quote:
Originally Posted by kovidgoyal View Post
And you can have your saved search search for kindle AND favorites (or indeed any arbitrarily complex search that you can dream up)
Good to know. What's the syntax for that? Assuming I have the following saved searches:
kindle
stanza
favorites
unread

Can I just use the following command-line to launch the content server:
Code:
calibre-server.exe -p 8081 --max-opds-items 30 --restriction "stanza AND favorites AND unread"
calibre-server.exe -p 8082 --max-opds-items 30 --restriction "kindle AND favorites AND unread"
Thanks!
ilovejedd is offline   Reply With Quote
Old 09-21-2011, 06:10 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,233
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Save the search

kindle and favorites

as something and then use that saved search.
kovidgoyal is offline   Reply With Quote
Old 09-21-2011, 08:03 PM   #10
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by kovidgoyal View Post
Save the search

kindle and favorites

as something and then use that saved search.
So it's exactly as chaley described. I was wondering if I can use multiple saved searches instead of creating a saved search for each combination I might want. No matter, it's a minor inconvenience.
ilovejedd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
Calibre-server port not open issue on Fedora server stueyboy Devices 0 08-17-2011 04:57 PM
Calibre-server jlutes Library Management 4 08-11-2011 04:44 PM
calibre Server TonytheBookworm Calibre 3 01-20-2011 05:33 AM
Calibre server zzmijarevic Calibre 10 08-21-2010 06:40 AM


All times are GMT -4. The time now is 01:28 PM.


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