Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary Plugin #724

Closed
cody-code-wy opened this issue Oct 25, 2018 · 11 comments
Closed

Dictionary Plugin #724

cody-code-wy opened this issue Oct 25, 2018 · 11 comments
Labels
Stale Stale issue, closing soon.

Comments

@cody-code-wy
Copy link

I noticed a distinct lack of a dictionary plugin (that works without some keyword), and im planning to develop one. I noticed that the contributing policy asks people not to just make stuff and send a PR so im making this issue first. I hope this is inline with what that meant.

Dictionary lookup is one of my favorite features of spotlight, and something I use frequently.

So what I intend to make is a plugin (C++) that does not require a trigger keyword (eg: it should work like the calculator plugin) that when a word is typed in will be looked up in a dictionary and displayed in the list with lowered priority.

I am currently planning to use the DICT protocol along with the dictd application (or any other similar server) to allow fast lookup of arbitrary compatable dictionaries

I am wondering what the best way to do this, because the lookup can take around 1-3 seconds depending on the computer's speed and I don't want to delay other things being shown, and I haven't really found if results are populated async.

@balta2ar
Copy link

For those who doesn't own a Mac, could you show how it looks like or record a short GIF/video, please?

@cody-code-wy
Copy link
Author

cody-code-wy commented Oct 26, 2018

@balta2ar This is how it looks in the current version of spotlight
Spotlight Dictionary Lookup
)

@cody-code-wy
Copy link
Author

cody-code-wy commented Oct 26, 2018

So I have a working proof of concept now. It has some pretty poor implementation, but it does actually work. The main thing to note is that it is actually connecting to a DICT server running locally with the (WordNet)[https://wordnet.princeton.edu] dictionary and performing requests as words are typed. So while its possible that on very slow machines it could be problematic, but on any modern system it will work without any serious issue as the requests return in 40-50ms normally.

I created this gif to show an example of it working.

albert_rec

apperently plugin is not in the wordnet dictionary?

@cody-code-wy
Copy link
Author

Some additional work the plugin is now somewhat functional

albert_rev2

Definitions can still span longer than the result box is, and its likely not extremely well optimized as I am not particularly farmilar with programming with QT.

@cody-code-wy
Copy link
Author

My Branch of the Plugins

@capi1O
Copy link

capi1O commented Oct 29, 2018

Thanks @cody-code-wy ! I looked at your repo but was not sure which dir to copy to test your extension, any instructions ?

@cody-code-wy
Copy link
Author

Thanks @cody-code-wy ! I looked at your repo but was not sure which dir to copy to test your extension, any instructions ?

My repo is of the Albert-plugins repository. The main Albert repository uses git submodules, and my repository should be used in place of plugins submodule. If you need some help with actually building the extension, or working with git you can find me on the Albert Telegram Group I'm codycode on there.

@stale stale bot added the Stale Stale issue, closing soon. label Nov 5, 2020
@stale stale bot closed this as completed Dec 5, 2020
@ManuelSchneid3r
Copy link
Member

What is your backend? Mind to share?

@aronstonehiggs
Copy link

Dictionary only work in Mac os now, you can change to goldendict in Debian.

  1. enable Python plugins
    image

  2. enable GoldenDict
    image

@albertlauncher albertlauncher deleted a comment from stale bot Dec 3, 2024
@ManuelSchneid3r
Copy link
Member

is this still a thing?

@ManuelSchneid3r
Copy link
Member

Reopen if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale issue, closing soon.
Development

No branches or pull requests

5 participants