EpicEric / ilo-toki

(DEPRECATED) Learn Toki Pona by translating sentences from English

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(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.
  • Procfile and app.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 format postgresql://[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. See app.json for 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.

About

(DEPRECATED) Learn Toki Pona by translating sentences from English

License:MIT License


Languages

Language:Python 53.6%Language:Vue 40.8%Language:JavaScript 3.6%Language:HTML 1.7%Language:CSS 0.2%Language:Procfile 0.1%