Coder Social home page Coder Social logo

sublimetranslit's Introduction

SublimeTranslit

build

SublimeTranslit is a plugin for Sublime Text 3 (http://www.sublimetext.com/3) for transliterating selected text.

Intented to be used via Command Palette.

Install

Install using Package Control: Translit

Usage

Open Command Palette and type "translit" to see several options.

Creating Transliteration Dictionaries

SublimeTranslit supports extending it with additional dictionaries.

Every Dictionary is described by two files:

  1. dictionary_name.json - is used to define characters mapping.
  2. dictionary_name.sublime-commands - is used to add a command for this dictionary to Command Palette.

dictionary_name.dict

Contains mapping (dictionary "chars_mapping") of characters.

All other fields (name, description, link) is optional and specified in order to explain used translit rules and point to source documents.

dictionary_name.sublime-commands

It is a ordinary .sublime-commands file for Command Palette item for this dictionary.

Should run command transliterate_selection with parameter dictionary_file - a file name of dictionary_name.json (without path).

Example:

[
    {
        "caption": "<command name>",
        "command": "transliterate_selection", "args":
        {
            "dictionary_file": "dictionary_name.json",
            "invert_mapping": false
        }
    }
]

invert_mapping field will trigger inverting of mapping from JSON file which is useful to use one mapping file to define two transliterations (both sides).

Run unittests

Using pytest:

$ pytest

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.