Giter VIP home page Giter VIP logo

light-dict's Introduction

Light Dict

Lightweight extension for instant action to primary selection, especially optimized for Dictionary lookup.

L, you know what? The Shinigami only eats apples. โ€”โ€” Light Yagami
license


ld

Installation

Recommended

Get it on GNOME Extensions

Manual

The latest and supported version should only work on the the most current stable version of GNOME Shell.

git clone https://github.com/tuberry/light-dict.git && cd light-dict
make && make install
# make mergepo # for translation

For older versions, it's necessary to switch the git tag before make:

# git tag # to see available versions
git checkout your_gnome_shell_version

Features

Basic

  • Scroll on the iconbar to flip pages;
  • Scroll on the systray to toggle triggers;
  • Middle click on the panel to copy its content;

DBus

For the DBus usage, see _ldocr.fish as a sample reference.

Methods

gdbus introspect --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/LightDict

Arguments

  • temp: a string (temporary parameters for OCR)
  • type: '^swift(:.+)?$' | 'popup' | 'display' (fallback) | 'auto' (follow the trigger)
  • text: a string | '' (for primary selection)
  • info: a string (for the 'display' type) | '' (for the other types)

OCR

Dependencies

yay -S python-opencv python-pytesseract # use the package manager of your distro

Usage

Enable OCR and fill in parameters (click the button for details) as you wish:

ocr

Note that OCR here is subject to factors such as font, color, and background, which says that any unexpected results are expected, but usually the simpler the scene the better the results.

Screencast

peek-light-dict-ocr.mp4

Note

  • This extension doesn't offer any additional icons or dictionaries.
  • If you need English-Chinese offline dictionaries, try dict-ecdict or dict-cedict.
  • If you need to customize the appearance of some widgets, try user-theme-x.

Acknowledgements

light-dict's People

Contributors

tuberry avatar vistaus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.