A clone of xsduan's conniebot for matrix
Go to file
Daniel Løvbrøtte Olsen 8974e24989 update package-lock 2019-02-26 15:34:23 +01:00
x2i Add x2i license 2019-02-26 12:51:43 +00:00
.envrc Nix shell stuff 2019-02-25 21:20:43 +01:00
.gitignore Nix shell stuff 2019-02-25 21:20:43 +01:00
Dockerfile init 2018-12-03 01:12:20 +00:00
LICENSE Add LICENSE 2019-02-26 12:50:41 +00:00
README.md Add Setup and development instructions 2019-02-26 12:48:06 +00:00
config.json.example init 2018-12-03 01:12:20 +00:00
index.ts Add help and debug 2019-02-26 01:21:08 +01:00
package-lock.json update package-lock 2019-02-26 15:34:23 +01:00
package.json Update bot sdk 2019-02-26 00:10:12 +01:00
shell.nix Nix shell stuff 2019-02-25 21:20:43 +01:00

README.md

About

This is a bot for converting x- or z-sampa to IPA, or converting a custom ascii notation to standard PIE notation.

Simply type your ascii inside // or [] with a prefixed x, z or p for x-sampa, z-sampa and PIE-notation respectively.
For instance:
x[sts_>q_hts_ht_hx] gives [st͡sʼqʰt͡sʰtʰx]
x/dZAn "m{d@n/ gives /d͡ʒɑn ˈmædən/
p[x2"owis x1"ek'wo:s-kve] gives *h₂ówis h₁é"kwōs-kʷe

Guides to these systems can be found here:
X-sampa: https://en.wikipedia.org/wiki/X-SAMPA
Z-sampa: http://www.kneequickie.com/kq/Z-SAMPA
For the PIE notation:

  • a preceding " is acute accent
  • a following : is the macron
  • a following . is the syllabicity marker
  • h always becomes superscript and v is superscript w.
  • Palato-velars are marked with a following ' and x1, x2, x3 etc. yields the laryngeals, with x@ for the subscript a laryngeal, and xx for an unknown laryngeal.

This is best learned by experimenting.

These conversions were originally taken from xsduan/conniebot. But have later divirged a bit.

To use the bot I run an instance at @wug:dodsorf.as, you can invite it to a room or DM it to use the converter. Or you can read the setup instructions below to host your own!

Setup

  1. Copy config.json.example to config.json
  2. Change the homeserver value to your homeserver api url (i.e "https://matrix.dodsorf.as")
  3. Change the token value to your users token. see https://t2bot.io/docs/access_tokens/ for how to get one.
  4. npm install and npm start

You could also build a docker image but you're on your own there!

Development

npm install and npm start

If you use nix you can run shell.nix to get node and npm in your environment.
If you use direnv you can also load the shell automatically