Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Narazaka/kawari.js
Programmable pseudo AI KAWARI 8 on JavaScript
https://github.com/Narazaka/kawari.js
shiori ukagaka
Last synced: 28 days ago
JSON representation
Programmable pseudo AI KAWARI 8 on JavaScript
- Host: GitHub
- URL: https://github.com/Narazaka/kawari.js
- Owner: Narazaka
- Created: 2014-11-27T16:09:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-11T07:35:18.000Z (over 6 years ago)
- Last Synced: 2024-10-04T23:02:39.949Z (about 2 months ago)
- Topics: shiori, ukagaka
- Language: JavaScript
- Size: 1.86 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
kawari.js
=======================================Programmable pseudo AI KAWARI 8 on JavaScript
Original SHIORI module
---------------------------------------[KAWARI](http://kawari.github.io/) by KAWARI Development Team
**Caution**:
This module is maintained by [Narazaka](http://narazaka.net/) and not officially supported by KAWARI Development Team.
Do not report bugs or something that is caused by kawari.js to KAWARI Development Team.Installation
---------------------------------------```bash
npm install kawari.js
```Usage
---------------------------------------This module has only low level API, that is provided by emscripten.
So use the wrapper module, [nativeshiori](https://github.com/Narazaka/nativeshiori), and do like below.
```javascript
// in browser// in node.js
const NativeShiori = require("nativeshiori");
const NativeShioriEncode = require("nativeshiori/nativeshiori-encode");
const Encoding = require("encoding-japanese");
const newKawari = require("kawari.js"); // or kawari.js/wasmvar kawarircContent = 'System.Callback.OnGET: test\r\n';
var kawarirc = Encoding.convert(Encoding.stringToCode(kawarircContent), 'SJIS', 'UNICODE');
var storage = {
'kawarirc.kis': new Uint8Array(kawarirc) // filename: ArrayBufferView
};newKawari(function (Kawari) {
// Shiori instance and optional storage (/path/to/ghost/master/*)
var nativeshiori = new NativeShioriEncode(new NativeShiori(Kawari));// write files in storage to FS (/path/to/ghost/master/*)
nativeshiori.push("/path/to/ghost/master/", storage);// write files in storage to FS then load() if storage exists, else load()
var loadCode = nativeshiori.load('/path/to/ghost/master');// request()
var response = nativeshiori.request('GET SHIORI/3.0\r\nCharset: Shift_JIS\r\nID: OnBoot\r\n\r\n');// unload()
var unloadCode = nativeshiori.unload();// read and unlink files in FS and return them (filename: ArrayBuffer)
var afterStorage = nativeshiori.pull("/path/to/ghost/master/");
});
```Build
--------------------------------```bash
make -R
make test
```LICENSE
--------------------------------(C) 2018 Narazaka : Licensed under [The BSD 3-Clause License](http://narazaka.net/license/BSD3?2018)