Skip to content

lrorpilla/DSL2JSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

DSL2JSON

picture picture

A script for converting DSL format dictionaries compatible with GoldenDict to the Migaku Dictionary format. Useful for converting multilingual dictionaries. Written for the language learning community.

🛠️ Features

  • Converts DSL format dictionaries to JSON tested for compatibility with the Migaku Dictionary Add-on for Anki.
  • Parses and sanitizes DSL tags and replaces them appropriately for readability.
  • Dictionary term and definition imports properly.

📖 Usage

In a working directory, download the script and execute it with the command below in the same folder with the DSL file to convert as follows with Python.

python3 DSL2JSON.py filename_of_dictionary_to_convert.dsl
  • Use of the script requires the chardet library to determine the encoding of the input file. The script will automatically download this file from PIP to facilitate ease of use. If the script does not work the first time, try running it again as the installation requires another startup of the script.
  • The script will output a DSL2JSON.zip file that can be imported with the Install Dictionary From File option in the Migaku Dictionary Settings menu. For more information, see the official guide on the Migaku add-on.
  • A DSL2JSON.json file is also left behind for debugging purposes should any escape character errors with the JSON occur.

🚀 Possible Extensions

  • Improve script to recognize altterm, pronunciation, parts of speech and example fields.
  • Test script for reliability on multiple dictionaries.

About

A script for converting DSL format dictionaries compatible with GoldenDict to the Migaku Dictionary format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages