Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manateelazycat/sdcv
Emacs interface for sdcv (Stardict console version)
https://github.com/manateelazycat/sdcv
Last synced: 12 days ago
JSON representation
Emacs interface for sdcv (Stardict console version)
- Host: GitHub
- URL: https://github.com/manateelazycat/sdcv
- Owner: manateelazycat
- Created: 2018-09-10T06:19:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-28T10:16:41.000Z (over 2 years ago)
- Last Synced: 2024-08-04T04:04:09.605Z (4 months ago)
- Language: Emacs Lisp
- Size: 332 KB
- Stars: 73
- Watchers: 6
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is sdcv?
Interface for sdcv (StartDict console version).
Translate word by sdcv (console version of Stardict), and display
translation use posframe or buffer.## Installation
#### 1. Install Stardict and sdcv
To use this extension, you have to install Stardict and sdcv
##### Linux
```Bash
sudo aptitude install stardict sdcv -y
```##### MacOS
```Bash
brew install stardict sdcv
```#### 2. Install posframe extension
You can install get it from:
https://raw.githubusercontent.com/tumashu/posframe/master/posframe.el#### 3. Require sdcv.el
Put sdcv.el and posframe.el to your load-path.
And add the following to your .emacs startup file.
```Elisp
(require 'sdcv)
```## Configuration
```Elisp
(setq sdcv-say-word-p t) ;say word after translation(setq sdcv-dictionary-data-dir "startdict_dictionary_directory") ;setup directory of stardict dictionary
(setq sdcv-dictionary-simple-list ;setup dictionary list for simple search
'("懒虫简明英汉词典"
"懒虫简明汉英词典"
"KDic11万英汉词典"))(setq sdcv-dictionary-complete-list ;setup dictionary list for complete search
'(
"懒虫简明英汉词典"
"英汉汉英专业词典"
"XDICT英汉辞典"
"stardict1.3英汉辞典"
"WordNet"
"XDICT汉英辞典"
"Jargon"
"懒虫简明汉英词典"
"FOLDOC"
"新世纪英汉科技大词典"
"KDic11万英汉词典"
"朗道汉英字典5.0"
"CDICT5英汉辞典"
"新世纪汉英科技大词典"
"牛津英汉双解美化版"
"21世纪双语科技词典"
"quick_eng-zh_CN"
))
```After completing the above configuration, please execute the command ```sdcv-check```
to confirm that the dictionary settings is correct,
otherwise sdcv will not work because there is no dictionary file in sdcv-dictionary-data-dir.## Usage
Below are commands you can use:
| Command | Description |
| :--- | :--- |
| sdcv-search-pointer | Search around word and display with buffer. |
| sdcv-search-pointer+ | Search around word and display with tooltip. |
| sdcv-search-input | Search input word and display with buffer. |
| sdcv-search-input+ | Search input word and display with tooltip. |Tips:
If current mark is active, sdcv commands will translate
region string, otherwise translate word around point.## Dictionary
You can download sdcv dictionary from http://download.huzheng.org/dict.org/