foo-dogsquared / pop-launcher-plugin-duckduckgo-bangs Goto Github PK
View Code? Open in Web Editor NEWA Pop launcher plugin to search multiple pages with Duckduckgo bangs.
License: GNU General Public License v3.0
A Pop launcher plugin to search multiple pages with Duckduckgo bangs.
License: GNU General Public License v3.0
While the bangs database from Duckduckgo has the ranking stored in the r
key, it is better to assume that all databases have no rankings. UX-wise, it makes sense to make our plugin store the rankings especially if #1 is implemented where there is no relevance stored in the database.
Possible implementations:
Modify the bangs database to store the ranking.
This is the last preference to implement. It can be slow and can be interrupting to the database.
Store in a separate file.
Maybe in a JSON file, RON file, or even a simple plain-text file similar to ~/.bash_history
.
Brave Search has a bangs database based from Duckduckgo. Though, it has been updated to have a cleaner scheme and additional metadata including a favicon link which could be used for Pop launcher since it can display them (see updated web plugin for an example of display favicons).
It will break existing changes so this will be set for v2 (if that ever happens). Additionally, Brave Search is in beta (as of 2022-04-24) so this issue will not be revisited for some time (probably). Even though, there's only a couple of users ;p, it's best to assume that in this planet of 10 billion people, somebody out there uses plugin AND uses a customized version of Duckduckgo bangs database (READ: ME!!!!).
These are the changes that will break the plugin that guarantee v2:
{query}
instead of {{{s}}}
).I got an error while running make install
telling me the script was using a flag that is only supported on cargo nightly, so I ran rustup default nightly
and ran make install
again. This time I got this error:
pop-launcher-plugin-duckduckgo-bangs on ๎ master is ๐ฆ v0.1.0 via ๐ฆ v1.66.0-nightly
โฏ make install
cargo fmt -- --check && cargo clippy -- -Dwarnings
Compiling proc-macro2 v1.0.29
Compiling unicode-xid v0.2.2
Compiling syn v1.0.76
Compiling fnv v1.0.7
Compiling ident_case v1.0.1
Compiling strsim v0.10.0
Compiling serde_derive v1.0.130
Compiling futures-core v0.3.17
Compiling serde v1.0.130
Compiling memchr v2.4.1
Checking cache-padded v1.1.1
Compiling rustversion v1.0.5
Compiling libc v0.2.102
Compiling ryu v1.0.5
Checking concurrent-queue v1.2.2
Checking waker-fn v1.1.0
Checking pin-project-lite v0.2.7
Compiling serde_json v1.0.67
Checking parking v2.0.0
Checking fastrand v1.5.0
Checking futures-io v0.3.17
Checking event-listener v2.5.1
Checking async-task v4.0.3
Checking futures-lite v1.12.0
Checking async-channel v1.6.1
Compiling quote v1.0.9
Checking once_cell v1.8.0
Checking atomic-waker v1.0.0
Checking itoa v0.4.8
Checking urlencoding v2.1.0
Compiling const_format_proc_macros v0.2.20
Checking dirs-sys v0.3.6
Checking blocking v1.0.2
Checking dirs v4.0.0
Checking const_format v0.2.20
Compiling darling_core v0.13.0
Compiling darling_macro v0.13.0
Compiling darling v0.13.0
Compiling serde_with_macros v1.5.0
Checking serde_with v1.10.0
Checking pop-launcher v1.0.1
Checking pop-launcher-plugin-duckduckgo-bangs v0.1.0 (/home/aadil/code/pop-launcher-plugin-duckduckgo-bangs)
error: the borrowed expression implements the required traits
--> src/config.rs:28:53
|
28 | if let Ok(string) = std::fs::read_to_string(&db_path) {
| ^^^^^^^^ help: change this to: `db_path`
|
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: could not compile `pop-launcher-plugin-duckduckgo-bangs` due to previous error
make: *** [Makefile:11: test] Error 101
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.