The goal of this project is to find and safely replace the dash in Romanian words with the non-breaking dash. It is one of my first GoLang projects and also it was built under pressure, so bear with the code clumsiness.
🇷🇴 Scopul acestui proiect este să înlocuiască, într-un mod cât mai sigur, cratima-minus cu cratima-care-nu-desparte-cuvintele (aka non-breaking hyphen). Motivul principal este acela că în mod implicit HTML desparte linia după minus, iar acest lucru nu este corect în scrierea românească. Vizual diferențele sunt minore (minus: -
, non-breaking-hyphen: ‑
)
Exemple: "să-l" devine "să-l"
Abordarea este ușor naivă, dar prinde majoritatea cazurilor. Sunt trei categorii de înlocuiri:
- cuvinte de sine stătătoare: într-o, mi-au, etc.
- terminații: -mi-l (dă-mi-l)
- excepții: a VII-a, 'mă-sa'
If you are lazy, go to the releases page and download the binary.
Otherwise, setup a Go dev environment, clone the source, do a go build
, go install
and enjoy.
After having the executable in your path, use this utility as a command line to tool.
Test it with kratimator -h
.
By default it does not overwrite files, but adds a funny extension in the same path. There is an option to overwrite the files, but you have to discover it for yourself under the -h
flag. With power comes responsibility.
Glob patterns work very well with zsh (maybe with other shells, but I haven't tested yet). Something like:
kratimator ~/some/random/path/**/*.jade
This software is licensed under GPLv3 License.
Feel free to submit PRs or Issues.