zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Feature request) customize search engine #3882

Closed Nriver closed 1 year ago

Nriver commented 1 year ago

Describe feature

Today, a user complained to me that the default search engine in Trilium is duckduckgo, which is blocked in China. It would be beneficial if we could customize the search engine to use alternatives such as bing or baidu for searching messages.

Also, I believe it would be intriguing to send the message to my personal ChatGPT bot. Given its impressive capabilities, connecting Trilium and ChatGPT in some manner would be a fascinating prospect.

Additional Information

No response

zadam commented 1 year ago

A configurable search engine is possible, but perhaps not the highest priority. Should be relatively easy as a contribution, though.

Basically there would be a new "options" row and UI in Options where you can define a template like https://duckduckgo.com/?q={keywords} with perhaps few predefined options.

Regarding ChatGPT, such integration seems very vendor specific. It looks more like a use case for custom widgets / scripting.

meichthys commented 1 year ago

I'm confused. We can search the internet from within Trilium? How do we do that? Also, @Nriver are you using Trilium in a multi-user environment? If so, I'd be interested in discussing more about that in the discussions section.

sigaloid commented 1 year ago

I'm confused. We can search the internet from within Trilium? How do we do that?

In the desktop app, you can select text and it suggests to search in a search engine.

image

meichthys commented 1 year ago

Ok, Neat! I use DDG by default in my browser so a similar context menu appears 👍 image

Nriver commented 1 year ago

@meichthys The search engine url is currently hard-coded to duckduckgo.

The user I said is just one of the Chinese users who is using the Chinese version of Trillium that I made with the trilium-translation project.

meichthys commented 1 year ago

Ah ok 👍

Nriver commented 1 year ago

Hi, I've made a PR to achieve this feature. Please have a look.

Nriver commented 1 year ago

Closing for https://github.com/zadam/trilium/pull/3901