Fivefold / linkding-injector

Injects search results from the linkding bookmark service into search pages like google and duckduckgo
MIT License
216 stars 8 forks source link

Support for selfhosted Whoogle #5

Open ServerGeek82 opened 1 year ago

ServerGeek82 commented 1 year ago

Would the issue opened for SearX apply to support for Whoogle as well?

Fivefold commented 1 year ago

Unfortunately yes. The underlying problem is that I need to pre-define match patterns for any urls where the extension is to be injected. With self-hosted solutions the URL could be any URL and I don't want to inject the script into all pages. It's not just an unclean solution, it might not even pass validation by Mozilla and Chrome.

I looked at the match patterns again and a compromise solution might be to match something like https://*/search?* and https://*/search?*. This would match any URL with a path ending in search (and optional a query string. Examples: https://mysite.com/search https://mysite.com/search?s=mysearchterm

This would require Whoogle and/or Searx to be configured in such a way that they are accessible via those urls with the /search path. Should be possible with something like nginx or Traefik, I've not tried Searx or Whoogle myself though, so I'm unaware of how they handle their URL.

What do you think of this solution?

faultoverload commented 1 year ago

SearXNG which is a fork of SearX supports the /search and you can find a list of public instances here to test. https://searx.space/

Fivefold commented 1 year ago

Thank you @faultoverload, I also found a few public whoogle instances: https://github.com/benbusby/whoogle-search#public-instances. The two I tested also added a /search to the path.

I might revisit adding SearX (and Whoogle) support then. No ETA though, since I'm quite busy at the moment.

@ServerGeek82 I noticed that Whoogle does not have a sidebar to display linkding results in. What solution would you think fits Whoogle best? Some ideas:

  1. Add it somewhere inside the main feed, e.g. right below the search line or below the rest of the results
  2. To the right of the main feed, essentially creating it's own sidebar. Would break the intended design of whoogle though, which seems optimised for small screens.
alexlyee commented 1 year ago

I've been waiting to use this project since I found it, which was just after this issue was opened. bumping SearXNG support!

Fivefold commented 1 year ago

Thank you @alexlyee, SearX support hasn't been forgotten. I'm just stuck at the moment with a very frustrating bug regarding the switch to manifest v3 and I need to handle that before any new features. Unfortunately I'm very busy currently. Can't give an ETA I'm afraid.

I created a new issue for SearX here: https://github.com/Fivefold/linkding-injector/issues/9. Please use it for any further SearX-related discussion, so this issue can focus on Whoogle.

alexlyee commented 1 year ago

@Fivefold No worries, take your time, thank you !

alexlyee commented 1 year ago

@Fivefold This update works flawlessly, thank you so much!