Giter Club home page Giter Club logo

transbot's Introduction

The translit xmpp bot

This xmpp bot converts russian text into latin script (transliteration). The list of encode tables available by ':help' command.

Tested on Python 2.7

Contents

Install package using setuptools, virtualenv:

mkdir transbot
cd transbot
virtualenv --python=python2.7 env
source env/bin/activate
pip install git+git://github.com/vasnake/transbot.git@master
# or download package and exec
python setup.py install

Change account settings in the file translit_xmpp_bot.py:

USER = "[email protected]"
PASSWORD = "google account passphrase"
SERVER = "gmail.com"

or set environment vars for using GTalk account:

export TRANSBOT_USER='bot [email protected]'
export TRANSBOT_PASSWORD='secret'
export TRANSBOT_SERVER='gmail.com'
export PYTHONIOENCODING=UTF-8

and start bot:

python -m translitbot

Or you can just use module enc.py in your code:

>>> import translitbot.enc as enc
>>> inStr = u'опля'
>>> outStr = enc.translit(inStr, enc.DRIVELICMODE)

Or make chat with my bot xmpp:[email protected]

For detaching program from console (daemon mode) you can use screen command. For example:

screen -d -R transbot

Transliteration can be done with those tables

  • py trans https://github.com/zzzsochi/trans
  • ALA-LC
  • BGN/PCGN (1944)
  • ISO 9:1995, ГОСТ 7.79-2000 система А
  • ISO 9:1995, ГОСТ 7.79-2000 система Б
  • ISO/R 9 (1968), ГОСТ 16876-71, СТ СЭВ 1362-78, ООН (1987) таблица 1
  • ISO/R 9 (1968), ГОСТ 16876-71, СТ СЭВ 1362-78, ООН (1987) таблица 2
  • Британский стандарт (1958)
  • Водительское удостоверение (2000)
  • ГОСТ Р 52535.1-2006
  • Загранпаспорт (1997—2010)
  • Международные телеграммы
  • Научная

All this tables has been taken from http://ru.wikipedia.org/wiki/Транслитерация_русского_алфавита_латиницей except 'py trans'.

transbot's People

Contributors

vasnake avatar

Stargazers

 avatar

Watchers

Neustradamus avatar  avatar

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.