Kodla is a web application for spelling or codding Turkish alphabet. NATO phonetic alphabet
You can visit the Kodla website: kodla.link
- python3 -m pip install --user virtualenv
- python3 -m venv venv
- source venv/bin/activate
- pip install -r requirements.txt
- export FLASK_APP=app
- flask run
Define a cronjob - run every 5 min - to delete files older than 5 min in the static folder:
*/5 * * * find PATH/kodla/static/* -type f -mmin +5 -exec rm -f {} +
Replace "PATH" with the path of the Kodla folder.
Request:
- endpoint url: 127.0.0.1:5000/api
- method: POST
- body: JSON {"my_word" : "test word"}
Response:
- Success:
{
"audio_file_path": "static/FILE_NAME.mp3",
"coded_string": "Tokat , Edirne , Sinop , Tokat , BOŞLUK , çift ve , Ordu , Rize , Denizli"
}
- error:
If length my_word is 0 or >30:
{
"message": "Your entry could involve : lower or upper letters/numbers/_/-/space"
}
If my_word envolve forbidden characters:
{
"message": "Your entry should be between 1-30 letters"
}
Here it is a telegram bot for Kodla: kodla