- Python 53.6%
- Vue 40.8%
- JavaScript 3.6%
- HTML 1.7%
- CSS 0.2%
| .circleci | ||
| public | ||
| scripts | ||
| src | ||
| .gitignore | ||
| __init__.py | ||
| app.json | ||
| app.py | ||
| babel.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| Procfile | ||
| README.md | ||
| requirements.txt | ||
| tailwind.config.js | ||
(DEPRECATED) ilo toki
With Heroku's change of free plan, this project no longer works.
Simple web application and API to learn Toki Pona from a corpus of sentences and their English translations.
Features / ijo lon
- Filter by jan Pije's lessons if you are learning along.
- Choose between translating English to Toki Pona or the other way around.
- Found an error? Improve the original sentences on Tatoeba.
Project structure / sijelo ilo
The Python 3 scripts need a few libraries available from requirements.txt. The recommended way to install these is with a virtualenv. After setting it up, run:
pip install -r requirements.txt
When working on the frontend, get dependencies from package*.json into node_modules/ with npm as usual:
npm install
The rest of the project is structured as follows:
app.py: Main Flask application.scripts/: Database definitions and auxiliary scripts, such as scripts to download translations and insert to PostgreSQL. See the README for more information.Procfileandapp.json: Heroku's application and manifest files, respectively..circleci: CircleCI script to re-populate database every week.src/,public/, and*.js: Frontend content and configuration, such as VueJS, PostCSS, TailwindCSS...
Environment variables / nimi ma
When running the Flask API, use these environment variables:
DATABASE_URL(required): A PostgreSQL URI in the formatpostgresql://[user[:password]@][netloc][:port][/dbname]DEBUG(optional): Sets Flask to debug mode. Useful for development, but must not be used in production mode.SECRET_KEY(required for production): Flask's secret key, optional for development. Seeapp.jsonfor more information.
When running the VueJS frontend, use these environment variables:
VUE_APP_API_URL(required for production): Base URL for the API. If unset, it will use Flask's default development location (http://127.0.0.1:5000/).
Attributions / jo pi jan ante
The application and PostgreSQL database are hosted in Heroku with their free plans.
The translation files are provided by Tatoeba under CC BY 2.0 FR.