Merge branch 'develop' into 'master'
2.2.1 See merge request Dandellion/matrix-wug!12
This commit is contained in:
commit
3268701820
|
@ -1,6 +1,21 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
|
||||||
image: node:10-slim
|
image: node:10-slim
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
stage: build
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
- npm build
|
- npm run build
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- echo "Deploy to dodsorf.as"
|
||||||
|
environment:
|
||||||
|
name: wug dodsorf.as
|
||||||
|
only:
|
||||||
|
- master
|
4
index.ts
4
index.ts
|
@ -1,4 +1,4 @@
|
||||||
const version = "2.2.0";
|
const version = "2.2.1";
|
||||||
import x2i from "./x2i";
|
import x2i from "./x2i";
|
||||||
import { existsSync } from "fs";
|
import { existsSync } from "fs";
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ Thanks to Tuugaalikkuluk for the encoding`;
|
||||||
function xchr(roomId) {
|
function xchr(roomId) {
|
||||||
var message = `I'm sadly not smart enough to know which syllable to use in certain situations.
|
var message = `I'm sadly not smart enough to know which syllable to use in certain situations.
|
||||||
That means you have to help me out a little.
|
That means you have to help me out a little.
|
||||||
Write the wanted syllables down, but separate them by a dot (.)
|
Write the wanted syllables down, but separate them by a dot (.) or an apostrophe (')
|
||||||
|
|
||||||
Thanks to Tuugaalikkuluk for the encoding
|
Thanks to Tuugaalikkuluk for the encoding
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -15,9 +15,7 @@
|
||||||
"@types/node": "^10.12.11",
|
"@types/node": "^10.12.11",
|
||||||
"@types/xregexp": "^3.0.29",
|
"@types/xregexp": "^3.0.29",
|
||||||
"js-yaml": "^3.12.0",
|
"js-yaml": "^3.12.0",
|
||||||
"ts-node": "^7.0.1",
|
|
||||||
"typescript": "^3.2.1",
|
"typescript": "^3.2.1",
|
||||||
"xregexp": "^4.2.0",
|
"xregexp": "^4.2.0"
|
||||||
"nodemon": "^1.18.7"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,37 +23,37 @@ export function convert(input: string)
|
||||||
else if (i==1) {
|
else if (i==1) {
|
||||||
if (rom[0].toLowerCase()=='a') {
|
if (rom[0].toLowerCase()=='a') {
|
||||||
c=c+'Ꭰ';
|
c=c+'Ꭰ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2)
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2)
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='e') {
|
else if (rom[0].toLowerCase()=='e') {
|
||||||
c=c+'Ꭱ';
|
c=c+'Ꭱ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='i') {
|
else if (rom[0].toLowerCase()=='i') {
|
||||||
c=c+'Ꭲ';
|
c=c+'Ꭲ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='o') {
|
else if (rom[0].toLowerCase()=='o') {
|
||||||
c=c+'Ꭳ';
|
c=c+'Ꭳ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='u') {
|
else if (rom[0].toLowerCase()=='u') {
|
||||||
c=c+'Ꭴ';
|
c=c+'Ꭴ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='v') {
|
else if (rom[0].toLowerCase()=='v') {
|
||||||
c=c+'Ꭵ';
|
c=c+'Ꭵ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else if (rom[0].toLowerCase()=='s') {
|
else if (rom[0].toLowerCase()=='s') {
|
||||||
c=c+'Ꮝ';
|
c=c+'Ꮝ';
|
||||||
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
|
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
|
||||||
else rom=rom.slice(1);
|
else rom=rom.slice(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -78,7 +78,7 @@ export function convert(input: string)
|
||||||
};
|
};
|
||||||
if(flag) {
|
if(flag) {
|
||||||
c=c+syl[j][k];
|
c=c+syl[j][k];
|
||||||
if(rom[2]=="."&& isAlpha(rom[3])) rom=rom.slice(3);
|
if((rom[2] == "." || rom[2] == "'")&& isAlpha(rom[3])) rom=rom.slice(3);
|
||||||
else rom=rom.slice(2);
|
else rom=rom.slice(2);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -103,17 +103,17 @@ export function convert(input: string)
|
||||||
};
|
};
|
||||||
if(flag) {
|
if(flag) {
|
||||||
c=c+syl[j][k];
|
c=c+syl[j][k];
|
||||||
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
|
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
|
||||||
else rom=rom.slice(3);
|
else rom=rom.slice(3);
|
||||||
}
|
}
|
||||||
else if (rom.slice(0,3).toLowerCase()=="nah") {
|
else if (rom.slice(0,3).toLowerCase()=="nah") {
|
||||||
c=c+"Ꮐ";
|
c=c+"Ꮐ";
|
||||||
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
|
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
|
||||||
else rom=rom.slice(3);
|
else rom=rom.slice(3);
|
||||||
}
|
}
|
||||||
else if (rom.slice(0,3).toLowerCase()=="hna") {
|
else if (rom.slice(0,3).toLowerCase()=="hna") {
|
||||||
c=c+"Ꮏ";
|
c=c+"Ꮏ";
|
||||||
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
|
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
|
||||||
else rom=rom.slice(3);
|
else rom=rom.slice(3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
12
x2i/index.ts
12
x2i/index.ts
|
@ -38,7 +38,7 @@ const regex = OuterXRegExp(
|
||||||
const defaultMatchAction = (left: string, match: string, right: string) => left + match + right;
|
const defaultMatchAction = (left: string, match: string, right: string) => left + match + right;
|
||||||
const defaultMatchFunction = (match: string, keys: ([RegExp, string | ((m: {[key: string]: string;}) => string), string][])) => OuterXRegExp.replaceEach(match, keys as (RegExp | string)[][])
|
const defaultMatchFunction = (match: string, keys: ([RegExp, string | ((m: {[key: string]: string;}) => string), string][])) => OuterXRegExp.replaceEach(match, keys as (RegExp | string)[][])
|
||||||
|
|
||||||
import * as chr from "./chr";
|
import * as chr from "./dictionaries/chr";
|
||||||
|
|
||||||
const matchType: { [key: string]: IMatchInstructions } = {
|
const matchType: { [key: string]: IMatchInstructions } = {
|
||||||
chr: {
|
chr: {
|
||||||
|
@ -47,21 +47,21 @@ const matchType: { [key: string]: IMatchInstructions } = {
|
||||||
},
|
},
|
||||||
ik: {
|
ik: {
|
||||||
join: (_, match) => `- ${match}`,
|
join: (_, match) => `- ${match}`,
|
||||||
keys: readKeys("./x2i/ik-keys.yaml"),
|
keys: readKeys("./x2i/dictionaries/ik-keys.yaml"),
|
||||||
},
|
},
|
||||||
p: {
|
p: {
|
||||||
join: (_, match) => `*${match}`,
|
join: (_, match) => `*${match}`,
|
||||||
keys: readKeys("./x2i/apie-keys.yaml"),
|
keys: readKeys("./x2i/dictionaries/apie-keys.yaml"),
|
||||||
},
|
},
|
||||||
x: {
|
x: {
|
||||||
keys: readKeys("./x2i/x2i-keys.yaml"),
|
keys: readKeys("./x2i/dictionaries/x2i-keys.yaml"),
|
||||||
},
|
},
|
||||||
z: {
|
z: {
|
||||||
keys: readKeys("./x2i/z2i-keys.yaml"),
|
keys: readKeys("./x2i/dictionaries/z2i-keys.yaml"),
|
||||||
},
|
},
|
||||||
i: {
|
i: {
|
||||||
join: (_, match) => `- ${match}`,
|
join: (_, match) => `- ${match}`,
|
||||||
keys: readKeys("./x2i/i-keys.yaml"),
|
keys: readKeys("./x2i/dictionaries/i-keys.yaml"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue