Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Freda search functionality for network-connected libraries
#1
Hello,

I am using a network-connected library called "COPS" which is an alternative to the typical calibre service. I am able to get the Freda reader to connect to the library and log in, and I can browse and download/read books. However, the search functionality does not seem to work at all. When I use the search function, it doesn't seem to pass anything along to the server when performing the search. I believe that the search function uses Opensearch, but I can't seem to find much about if that is supported.

COPS is available on github here: https://github.com/seblucas/cops

Other readers have worked fine for me with the search function, so I hope that you can assist in this.

Let me know if you need more information and I'll provide what i can.
Reply
#2
Freda does not support OpenSearch, which is to say, it does not include the functionality to talk to an OPDS server and understand what URL format it should use to search the catalog.  So far, I didn't implement this functionality, because no one asked for it, and it's something that would be hard to get right.

My experience of implementing OPDS catalog connectivity in Freda is that this was hard enough already - not because the standard is hard to code up, but rather because there are many different OPDS catalogs out there, and they don't interpret the standard in the same way.  In practice that meant that, though Freda's OPDS implementation was compliant with the standard, I still got support calls (and one-star ratings) whenever some random catalog was following the standard in a way that Freda did not understand.  Thankfully, this problem has become less serious over time, as OPDS catalogs have become less popular (except in the case of Calibre - and these days Freda works pretty well with Calibre's particular interpretation of the OPDS standard).

Since Freda doesn't support OpenSearch, it does offer a way to manually configure the searching of OPDS catalogs.  For example, if you look at the Feedbooks catalog, by clicking the 'edit' button when viewing the catalog, you'll see that there's an attribute called 'search URL' with the value 'http://www.feedbooks.com/search.atom?query={0}'.  That's how Freda knows how to search Feedbooks.  When you tap the 'search' button, type 'FOO', and tap 'find', then Freda will interrogate the URI "http://www.feedbooks.com/search.atom?query=FOO", expecting to get an OPDS-compliant response back.  That is to say "{0}" just gets replaced by whatever you put in the search text box.  I hope that, using this information, you'll be able to get Freda to search your COPS catalog correctly.
Reply
#3
Thumbs Up 
(09-28-2021, 10:10 AM)jim_chapman Wrote: Freda does not support OpenSearch, which is to say, it does not include the functionality to talk to an OPDS server and understand what URL format it should use to search the catalog.  So far, I didn't implement this functionality, because no one asked for it, and it's something that would be hard to get right.

My experience of implementing OPDS catalog connectivity in Freda is that this was hard enough already - not because the standard is hard to code up, but rather because there are many different OPDS catalogs out there, and they don't interpret the standard in the same way.  In practice that meant that, though Freda's OPDS implementation was compliant with the standard, I still got support calls (and one-star ratings) whenever some random catalog was following the standard in a way that Freda did not understand.  Thankfully, this problem has become less serious over time, as OPDS catalogs have become less popular (except in the case of Calibre - and these days Freda works pretty well with Calibre's particular interpretation of the OPDS standard).

Since Freda doesn't support OpenSearch, it does offer a way to manually configure the searching of OPDS catalogs.  For example, if you look at the Feedbooks catalog, by clicking the 'edit' button when viewing the catalog, you'll see that there's an attribute called 'search URL' with the value 'http://www.feedbooks.com/search.atom?query={0}'.  That's how Freda knows how to search Feedbooks.  When you tap the 'search' button, type 'FOO', and tap 'find', then Freda will interrogate the URI "http://www.feedbooks.com/search.atom?query=FOO", expecting to get an OPDS-compliant response back.  That is to say "{0}" just gets replaced by whatever you put in the search text box.  I hope that, using this information, you'll be able to get Freda to search your COPS catalog correctly.

the "?query={0}" tacked onto the end of the feed URL did the trick. Search worked like a charm once that was added in.

5 Stars -- Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)