toaq / zugai

A Haskell library/program for parsing and interpreting Toaq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zugaı

This parser is outdated. Kuna is the new Toaq parser.

A tool for parsing and interpreting Toaq Gamma text.

It can currently be invoked from Discord using %tree Hıo ka or %logic Hıo ka or (silly) %english Hıo ka.

For programmers

zugai-exe

This is the "core" of zugaı that does all the hard work.

To build, get Haskell Stack and try stack build, stack test, stack run zugai-exe.

See stack run zugai-exe -- --help for command line instructions.

Discord bot

A Python-based Discord bot that invokes the zugaı core.

Instructions:

  1. Put zugai-exe on the PATH by running stack install
  2. Put inkscape on the PATH
  3. Run python3 -m pip install discord
  4. Set an environment variable export ZUGAI_DISCORD_TOKEN=<your bot token>
  5. Run python3 discord_bot.py

It responds to %tree/%logic/%english followed by a Toaq sentence.

Web server

A Python-based HTTP server. GET /zugai?text=jadi&to=english responds with zugai's result as plain text.

Try GET /zugai to see the supported &to= formats.

Instructions:

  1. Put zugai-exe on the PATH by running stack install
  2. Run python3 -m pip install flask
  3. Run FLASK_APP=web_server python3 -m flask run

About

A Haskell library/program for parsing and interpreting Toaq

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 71.1%Language:Prolog 11.1%Language:Python 7.6%Language:HTML 5.2%Language:TypeScript 2.6%Language:CSS 1.0%Language:Dockerfile 0.6%Language:TeX 0.4%Language:Shell 0.3%