GithubHelp home page GithubHelp logo

ninja33 / mdx-server Goto Github PK

View Code? Open in Web Editor NEW
218.0 12.0 50.0 2.17 MB

a service to read mdx/mdd file and provide http interface

License: GNU General Public License v3.0

Python 90.08% CSS 8.78% HTML 0.32% JavaScript 0.82%

mdx-server's Introduction

MDX Server

MDX Server is a service used to read MDX/MDD dictionary data and provide a standard HTTP interface to external tools.

It is just a combination of mdict-query and PythonDictionaryOnline.

Usage:

  1. Run mdx_server.py under Python 3.5 environment. When it shows a dialoge window to ask for mdx file, you may select a mdx file located in your disk. After it displayed port:8000 in console window, the service is running at background.
  2. Open your browser and input http://localhost:8000/{word} (the {word} is the English word you want to query.), then the definition of that word will be displayed according to which dictionary(mdx file) you selected in above step 1.

Please check with the manual for more detail and screenshot

MDX Server 使用说明

目前流行的 MDX 词典文件只能在 Mdict, GoldenDict, 欧路,深蓝等词典软件中使用,而不能将内容对外输出。MDX Server 通过读取 MDX、MDD 格式的词典文件,对外部提供一个标准的 HTTP 服务接口。使得一些需要词典服务的软件,比如 Kindlemate,Anki 划词助手以及其他工具可以利用这个本地服务,灵活选取所需的 MDX 词典,批量或者单独获取单词的解释。

  1. 在 python 环境下运行mdx_server.py,弹窗内选择本地 mdx 文件,console 窗口内显示port:8000 表明服务器运行成功,等待外部请求。
  2. 在浏览器地址栏输入 http://localhost:8000/{word},其中{word} 部分为待查的单词,比如 http://localhost:8000/test ,通过 mdx-server 查询,浏览器内将显示该单词在第 1 步所选词典内的解释。

MDX Server 核心功能由 mdict-queryPythonDictionaryOnline 整合而成。

更多内容和屏幕截图,请查阅手册

mdx-server's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mdx-server's Issues

online dictionary helper与longman6

我是用了online dictionary helper,词典是 朗文6,脚本是helper里面自带的,发现不能取词。然后进入helper的调试界面,有很多错误。

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'indexOf')
at encn_LDOCE6MDX.findLDOCE6 (eval at backend_loadScript (sandbox.js:39:26), :85:26)
at async Promise.all (index 0)
at async encn_LDOCE6MDX.findTerm (eval at backend_loadScript (sandbox.js:39:26), :34:23)
at async Sandbox.backend_findTerm (sandbox.js:74:25)

除了不能识别外部css文件,简直完美。

  • 使用过程中发现:css文件打包进mdd文件中,可以正常显示样式。
  • 如果css文件和mdx/mdd文件再一个文件中的话,css样式文件检测不到。。

哈哈,不过还是很Nice的!!!

is there a server mode without choosing files every launch?

Hi. Thank you for mdx-server! it's cool!

i want to run it on the server with my pali language project find.dhamma.gift. but everytime when i stop and launch the app it asks to choose the file.

how to skip this part and just start with the file i used last?
and also is it possible to use at lease 2 dictionaries? not only 1?

单词大小写敏感

比如使用牛津词典时,查Race是没有结果的,而必须是race才能查到.

可否改成大小写不敏感?

关于单词的形变

我看到了 #2 关于单词大小写的讨论,一个项目专注于一件事情本来是非常正确的事。

我经过一些调研,GoldenDict 通过 "构词法规则库"(Morphology)可以轻松的实现,但是 mdx-server 则不那么容易实现。Python 中我看到可以通过 nltk 这个库来去除单词的形变,是否可以考虑将单词去除形变作为一个可选项整合到 mdx-server 中,如果可以我提交 pull-request。

另外请问下作者有其他单词形变相关的 lib 吗?

字典文件

在哪可以找到manual里列出的字典文件?

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.