Skip to main content

Serbian language Cyrillic ↔ Latin transliteration tools

Project description

pipeline status coverage report

Srtools provides a CLI utility (srts) and a Python 3 (^3.7) package that helps you transliterate Serbian texts between Cyrillic and Latin.

Here’s a demonstration of the CLI utility:

$ echo "Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara." | srts --lc
Ђаче, уштеду плаћај жаљењем због џиновских цифара.
$ echo "Ђаче, уштеду плаћај жаљењем због џиновских цифара." | srts --cl
Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara.

Here’s how you use the Python package:

from srtools import cyrillic_to_latin, latin_to_cyrillic

assert (
    latin_to_cyrillic("Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara.")
    == "Ђаче, уштеду плаћај жаљењем због џиновских цифара."
)

assert (
    cyrillic_to_latin("Ђаче, уштеду плаћај жаљењем због џиновских цифара.")
    == "Đače, uštedu plaćaj žaljenjem zbog džinovskih cifara."
)

Motivation

I needed a simple commandline utility I can use to pipe in some text and change its script.

I also use this tool to transliterate strings in Serbian LaTeX localization packages. That way I don’t have to maintain individual sets of localization strings for Cyrillic and Latin.

Documentation

Documentation (Sphinx) can be viewed on GitLab pages for this package.

Changelog

The changelog can be found within the documentation, here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srtools-0.1.9.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

srtools-0.1.9-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file srtools-0.1.9.tar.gz.

File metadata

  • Download URL: srtools-0.1.9.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/5.4.109+

File hashes

Hashes for srtools-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e904902461a8dbe9602d56d36f71af211d2f1752850373b983d5f6357d0c76a0
MD5 b37a8166fac2b8222d0f2d74f16af5c0
BLAKE2b-256 99a031d55767e0d750c0b39d496595823d2841d5e9e58a743bdc12f6311f7f07

See more details on using hashes here.

File details

Details for the file srtools-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: srtools-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/5.4.109+

File hashes

Hashes for srtools-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2922ade3de1acdb9b76c126902aaeb0f2b7f994aa78b49378b3500d6d66f7ef2
MD5 c0f013cd9f88ebf0d2695bbca581772a
BLAKE2b-256 d4c36af0189750b39010460943f2caa3818d416f6d9ed7711aa0e6f675ec1408

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page