latin/README.md

33 lines
1.9 KiB
Markdown
Raw Normal View History

# About
As I've started learning Latin from Lingua Latina Per Se Illustrata I've encourtered the urge for Duolingo-like interface allowing me to:
1. check given words in the wiktionairy, so I could see IPA, meaning, declinations etc. next to the text,
2. perform the Pensa so that I could see the mistakes I've made.
2021-01-08 12:17:38 +01:00
So far I've managed to create cloze tasks for Pensa and Exercitia for the first 10 chapters. User can input the answers with or without macrons.
# Parsers
2021-01-08 12:17:38 +01:00
## Text to Cloze
2021-01-08 12:17:38 +01:00
```text2pensum_cloze.py``` takes text file as an input and generates HTML from it. Marking is as follows:
- all vowel-dash-vowel combinations (```i-i```) are transformed into a long vowel marked with macron (```ī```)
2021-01-07 22:20:42 +01:00
- underscore-string-underscore combinations (```_us_```) are transformed into requiered html text input field with string between underscores as a value of ```data-expected``` atribute (```<input type="text" data-expected="us">```).
2021-01-08 12:17:38 +01:00
```text2exercitium_cloze.py``` takes text file as an input and generates HTML from it according to the rules described above. Additionaly, the first line of the text file contains expresions separated with ```|``` based on which user should fill the input fields (sometimes declination of conjugation is necessary). Text files contains the lines (separated with ```\n```), which are processed into a list.
# TODO
- [x] text to html parser to swiftly migrate the cloze Pensa
- [ ] dictionairy interface
- [ ] sync performing Pensa with doneth.at
# Development
To run the app on your own machine run ```pipenv install``` to install requested packages based on the Pipfile and then run ```pipenv shell 'gunicorn --bind 0.0.0.0:5000 app:app'``` or ```flask run```.
## Docker-compose
2021-10-17 14:31:11 +02:00
When in directory with `Dockerfile ` run `docker run -p 3200:5000 latin .`.
To update docker image:
1. Go to `/etc/docker-compose/latin` and run `docker-compose build`.
2. Run `systemctl restart docker-compose@latin`.