Giter Club home page Giter Club logo

sdpy's Introduction

SDpy

SDpy is a TUI application for querying StarDict dictionaries.

sdpy interface

Requirements

SDpy uses the Python3, and following libraries:

This project also uses a scroll widget from stig project (included in the sources).

Installation

Preferred way for installation is to use virtualenv (or any other virtualenv managers), i.e:

$ python -m venv venv
$ . venv/bin/activate
(venv) $ git clone https://github.com/gryf/sdpy
(venv) $ cd sdpy
(venv) $ pip install .

Or via pip:

$ git clone https://github.com/gryf/sdpy
$ cd sdpy
$ pip install --user .

Executable sdpy should be now available in the $PATH.

Configuration

Config file sdpy.conf will be looked in $XDG_CONFIG_HOME, which usually means ~/.config. Config is very simple:

[DEFAULT]
basedir = /usr/share/stardict/dic
use-section-name = false

[dict.1]
filebase = dictd_www.freedict.de_eng-spa
name = Freedict English-Spanish

[dict.2]
filebase = quick_english-japanese
name = Quick English-Japanese
find-recursively-dir = 

Where

  • basedir - optional path to the dictionary files, saves typing whole path
  • use-section-name - false by default, forces sections name to be used instead of name field
  • find-recursively-dir - instead of manually adding dicts one by one, scan provided directory for dictionary files
  • filebase - mandatory filename of the database (without extensions like .idx, .dict, .dict.dz, .ifo)
  • name - optional name of the dictionary. If omitted, name will be obtained form dictionary .ifo file bookname field

Sections can be named whatever you want, it doesn't matter, and will be used instead of provided (or not) name only if use-section-name is set to true.

You can use filebase as relative path to the global basedir or local basedir placed in each section or even provide basedir for selected sections.

Note, that section order determine order of displayed definitions on the definitions view. Automatically scanned directory doesn't guarantee the order. Also note, that adding many dictionaries will increase startup time and will have impact on searching for the terms.

License

This work is licensed on GPL3 license. See LICENSE file for details.

sdpy's People

Contributors

gryf avatar

Watchers

 avatar  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.