Latinize is a library and CLI tool written in Nim, it's indeed to convert accents (diacritics) from strings to latin characters.
Find a file
2021-07-15 17:54:00 -03:00
.github/workflows Update minimum required version 2021-07-15 17:26:53 -03:00
external Update build script 2021-07-15 17:52:00 -03:00
src Initial commit 2021-07-15 17:17:56 -03:00
tests Initial commit 2021-07-15 17:17:56 -03:00
.gitignore Update .gitignore 2021-07-15 17:52:00 -03:00
latinize.nimble Update minimum required version 2021-07-15 17:26:53 -03:00
LICENSE Initial commit 2021-07-15 17:17:56 -03:00
README.md Update README.md 2021-07-15 17:54:00 -03:00

Latinize is a library and CLI tool written in Nim, it's indeed to convert accents (diacritics) from strings to latin characters.

This is a port of the original Latinize.js Node package.

Installation

Install using nimble:

nimble install --accept 'git://github.com/AmanoTeam/Latinize.git'

Note: Latinize requires Nim 1.4.0 or higher.

Library usage

import latinize

const
  text: string = "ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů"
  result: string = translate(s = text)

assert result == "ExAmPlE aeiouycdenrstzu"

CLI tool usage

$ latinize --help
usage: latinize [-h] [-v] -t TEXT

Simple Nim library and CLI tool to
convert accents (diacritics) from
strings to latin characters.

optional arguments:
  -h, --help        show this help
                    message and exit
  -v, --version     show version number
                    and exit
  -t TEXT, --text TEXT
                    text you want to
                    latinize

When no text are supplied, default
action is to read from standard input.

Downloads

You can download prebuilt static binaries of the CLI tool for Android and Linux from the GitHub releases page.

Contributing

If you have discovered a bug in this library and know how to fix it, fork this repository and open a Pull Request.

Third party software

Latinize includes some third party software in its codebase. See them below: