Giter Site home page Giter Site logo

zhudi's Introduction

What is Zhudi?

Zhudi is a GTK4 graphical interface to the EDICT dictionaries. The following ones are included by default:

Features

What platforms are supported?

Since this project is written in Python 3.10+ & GTK4, it should be able to run on any given platform. However, I only have tested it under GNU/Linux (Gnome).

What are the dependencies of Zhudi?

In order to run Zhudi, you need the following packages:

  • python 3.10+
  • python-gobject
  • pygobject-devel
  • gobject-introspection

You also need to have GTK 4 installed.

Installation

Pip

Zhudi can be installed using python's package manager pip as follows:

pip install git+https://github.com/Jiehong/Zhudi

Launching

Run it by running the zhudi python module in the directory you installed it from:

cd /path/to/zhudi
python -m zhudi

You should see the GUI up and running:

GUI screenshot

Development

Locally, you can use poetry.

First time:

poetry install

Then:

poetry run python -m zhudi

Command line usage

You also have access to a limited command line search as follows:

$ zhu 我
我    ㄨㄛˇ    I
           ⇾ me

Unlike the GUI, this only provides the first and best match so far.

Unit tests

dict_test.u8 is used to test the splitting of the dictionary, and then for the rest of the unittests.

First, test that splitting the dictionary is working well:

poetry run python test_cli.py

Then, test the rest of the units:

poetry run python -m unittest

Formatting

Source files are formatted with black:

poetry run python -m black zhudi && poetry run python -m black tests

New Dictionaries

Download any EDICT dictionary with the *.u8 format, and modify db_fill.py to read it.

Then run:

poetry run python db_fill.py

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.