https://github.com/katai5plate/aviutl-exo
Convert AviUtl exo files to JSON or YAML / aviutlのexoを扱うnpmパッケージ
https://github.com/katai5plate/aviutl-exo
aviutl aviutl-exo aviutl-plugin aviutl-script aviutl-sdk
Last synced: 2 months ago
JSON representation
Convert AviUtl exo files to JSON or YAML / aviutlのexoを扱うnpmパッケージ
- Host: GitHub
- URL: https://github.com/katai5plate/aviutl-exo
- Owner: katai5plate
- License: mit
- Created: 2019-07-19T23:39:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-20T13:08:46.000Z (almost 6 years ago)
- Last Synced: 2025-01-23T09:11:32.782Z (4 months ago)
- Topics: aviutl, aviutl-exo, aviutl-plugin, aviutl-script, aviutl-sdk
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aviutl-exo
Convert AviUtl exo files to JSON or YAML
# Usage
## install
```
npm install aviutl-exo
```## Usage for Node.js
```ts
import { decode, encode } from 'aviutl-exo';
import { load, save, loadEXO, saveEXO } from 'aviutl-exo/lib/node/fs';const decodeEXO2JSON = async (fileName: string, saving: boolean) => {
const exoText = await loadEXO(fileName);
const result = decode(exoText, 'JSON');
if (saving) await save(fileName, 'json', result);
return result;
};
const decodeEXO2YAML = async (fileName: string, saving: boolean) => {
const exoText = await loadEXO(fileName);
const result = decode(exoText, 'YAML');
if (saving) await save(fileName, 'yaml', result);
return result;
};const encodeJSON2EXO = async (fileName: string, saving: boolean) => {
const jsonText = await load(fileName, 'json');
const result = encode(jsonText, 'JSON');
if (saving) await saveEXO(fileName, result);
return result;
};
const encodeYAML2EXO = async (fileName: string, saving: boolean) => {
const yamlText = await load(fileName, 'yaml');
const result = encode(yamlText, 'YAML');
if (saving) await saveEXO(fileName, result);
return result;
};
```## Use for Browser
```ts
// TODO
```