Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lagleki/mietoa
https://github.com/lagleki/mietoa
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lagleki/mietoa
- Owner: lagleki
- Created: 2017-09-27T17:21:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T12:54:53.000Z (over 7 years ago)
- Last Synced: 2024-10-31T13:46:10.518Z (2 months ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# mietoa
Some utilities for the [toaq](http://toaq.org) language, featuring:
+ an interactive dictionary:
+ involving the files:
+ `dic.html`
+ `toaq_undiak_dict.js`
+ launch with:
+ open `dic.html` in a ⦅modern⦆ browser
+ a discord bot, able to search, match, and parse ⦅see the output of the `.h mietoa` command when invoked from discord⦆
+ involving the files:
+ all but not `dic.html`
+ launch with:
+ `node bot.js`, in a terminal with nodejs. Just fill up `bot.js` with the bot's parameters ⦅names of the authorized channels; and the bot's discord token⦆### generate the dictionary in a json format
```bash
wget toaq.org/dictionary/; perl -i -p -e 's/\<\!DOCTYPE(.*)\n//g;' -e 's?(.*)(.*)(.*)?\{toaq:$1,t_en:$2,d_en:$3?g;' -e 's/\"/\\"/g;' -e 's/\{toaq:(.*),t_en:(.*),d_en:(.*)/\{"toaq":"$1","t_en":"$2","d_en":"$3"/g;' index.html;
cat index.html | grep '{"toaq"' > undex.html; cat index.html | grep -oP '{"toaq":.*,"t_en"' | sed -E 's/[áàâāãǎả]/a/g;s/[éèêēẽěẻ]/e/g;s/[íìîīĩǐỉ]/i/g;s/[óòôōõǒỏ]/o/g;s/[úùûūũǔủ]/u/g;s/\{\"toaq\"\:/\"toaq_undia\":/g;s/",".*/"\},/g;' > undia;
paste -d ',' undex.html undia > toaq_dict.js; rm undia; rm undex.html; rm index.html; perl -i -p -e 'print "data = [\n" if $. == 1' toaq_dict.js; echo "]" >> toaq_dict.js; perl -i -p -e 's/\r\",\"/\",\"/g;' toaq_dict.js
```