diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..28d35ee --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# emoji regex generator + +this is a small program i wrote to generate a size-optimized regular expression +for matching emoji. i use this on a discord server (sorry) that has a channel +for emoji-based polls. we set up the [YAGPDB bot](https://yagpdb.xyz) with some +custom commands (which are limited to roughly ten thousand characters) to do +so. since it's built roughly as a one-off tool for this, it outputs the +language of the scripting system the bot uses, but this is mostly irrelevant. + +## usage + +``` +$ fennel make-regex.fnl > regex.txt +``` + +it reads a list of emoji from `emoji-test.txt`, which can be obtained from the +unicode consortium. the code for generating the output is near the end of the +file, and the configuration for how the regex is optimized (which is particular +to the data set) is placed at the top. |