10 Commits

Author SHA1 Message Date
danio dfbe938b68 Merge branch 'develop' into 'master'
Small maintainance update

See merge request Dandellion/matrix-wug!15
2020-07-16 17:31:46 +00:00
danio 70fad99e71 don't respond to m.notices 2020-07-16 18:53:50 +02:00
danio 268f73a9ce these are really some kind of array I promise typescript 2020-07-16 18:48:52 +02:00
danio 4b313d6dcd update package-lock.json 2020-07-16 18:37:15 +02:00
danio 059e83aa16 Update links to information 2020-07-16 16:34:21 +00:00
Daniel Løvbrøtte Olsen c8b721bf80 package-lock ... 2019-06-25 01:59:37 +02:00
danio f27347d6ec Merge branch 'develop' into 'master'
Develop

See merge request Dandellion/matrix-wug!14
2019-06-24 23:58:33 +00:00
Daniel Løvbrøtte Olsen e34de2f569 update @types/js-yaml 2019-06-25 01:57:52 +02:00
Daniel Løvbrøtte Olsen 002b941ee7 update version number 2019-06-25 01:56:00 +02:00
Daniel Løvbrøtte Olsen cea04d0e2a upgrade js-yaml 2019-06-25 01:53:14 +02:00
5 changed files with 374 additions and 514 deletions
+3 -9
View File
@@ -10,14 +10,8 @@ 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.
Z-sampa: https://web.archive.org/web/20191116002807/http://kneequickie.com/kq/Z-SAMPA
APIE: https://gist.github.com/xsduan/8ebd580be71214c57aa554ec9050916c
This is best learned by experimenting.
@@ -45,4 +39,4 @@ You could also build a docker image but you're on your own there!
`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
If you use direnv you can also load the shell automatically
+5 -4
View File
@@ -1,4 +1,4 @@
const version = "2.3.0";
const version = "2.3.2";
import x2i from "./x2i";
import { existsSync } from "fs";
@@ -24,6 +24,7 @@ async function handle(roomId, event) {
if (event.unsigned.age > 1000 * 60) { console.log("Message was old!"); return; };
if (event.sender === await myself) { console.log("Wait a minute... That's me!"); return;};
if (event.content.msgtype === "m.notice") { return; };
if (event.content.body === "!xhelp" || event.content.body === (await client.getUserProfile(await myself)).displayname + ": help") {help(roomId); return;};
if (event.content.body === "!xik") {xik(roomId); return;};
@@ -46,8 +47,8 @@ function help(roomId) {
To use me, type a key together with either / or [] as delimeters
x - X-SAMPA - https://en.wikipedia.org/wiki/X-SAMPA
z - Z-SAMPA - http://www.kneequickie.com/kq/Z-SAMPA
p - Proto-Indo-European Notation (see !xpie)
z - Z-SAMPA - https://web.archive.org/web/20191116002807/http://kneequickie.com/kq/Z-SAMPA
p - Proto-Indo-European Notation - https://gist.github.com/xsduan/8ebd580be71214c57aa554ec9050916c
i - Inuktitut Syllabics - https://en.wikipedia.org/wiki/Inuktitut_syllabics
ik - Iñupiatun Orthographies (see !xik)
chr - Cherokee (see !xchr) - https://en.wikipedia.org/wiki/Cherokee_syllabary
@@ -72,7 +73,7 @@ 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.
There's probably more, but this is best learned by experimenting (or reading https://github.com/dali99/matrix-wug/blob/master/x2i/apie-keys.yaml)
There's probably more, but this is best learned by experimenting (or reading https://gist.github.com/xsduan/8ebd580be71214c57aa554ec9050916c)
Thanks to conniebot (xsduan) for the encoding`;
+362 -498
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -11,10 +11,10 @@
"license": "ISC",
"dependencies": {
"matrix-bot-sdk": "^0.3.2",
"@types/js-yaml": "^3.11.2",
"@types/js-yaml": "^3.12.1",
"@types/node": "^10.12.11",
"@types/xregexp": "^3.0.29",
"js-yaml": "^3.12.0",
"js-yaml": "^3.13.1",
"typescript": "^3.2.1",
"xregexp": "^4.2.0"
}
+2 -1
View File
@@ -77,8 +77,9 @@ const matchType: { [key: string]: IMatchInstructions } = {
* @returns Compiled keys.
*/
function readKeys(fpath: string) {
return yaml
var keys: any = yaml
.safeLoad(fs.readFileSync(fpath, "utf8"))
return keys
.map(compileKey)
.filter(Boolean) as CompiledReplacer[];
}