Skip to content
/ sdpy Public

TUI application for querying StarDict dictionaries.

License

Notifications You must be signed in to change notification settings

gryf/sdpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

TUI application for querying StarDict dictionaries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages