TypeScript JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
doc
lib
src
test
types
.editorconfig
.gitignore
.npmignore
LICENSE
README.md
browser.js
node.js
package-lock.json
package.json
tsconfig.json
tslint.json
yarn.lock

README.md

webvsc

npm npm CircleCI David David

Description

Library to to batch-convert Winamp AVS presets into native Webvs JSON format. Take a look at the supported components.

Live Demo

Installation

Use your preferred Node package manager to install the package:

yarn add @visbot/webvsc || npm install  @visbot/webvsc

Usage

Node

convertFile(file, [options])

Example:

import { convertFile, convertFileSync } from '@visbot/webvsc/node';

let file = 'path/to/preset.avs';
let jsonString;

// Asynchronous
(async () => {
    try {
        jsonString = await convertFile(file);
    } catch (err) {
        console.error(err);
    }
})();

// Synchronous
try {
    jsonString = convertFileSync(file);
} catch (err) {
    console.error(err);
}

Browser

convertBlob(fileBuffer, fileName, fileDate, [options])

import { convertFile, convertFileSync } from '@visbot/webvsc/browser';

const baseName = 'my preset';
const modifiedDate = new Date(Date.now()).toISOString();

const webvs = convertBlob(avsBuffer, baseName, modifiedDate);

Options

hidden

Type: boolean
Default: false

Don't extract hidden strings from fixed-size strings

minify

Type: boolean
Default: false

Minify generated JSON

quiet

Type: boolean
Default: false

Prints errors only

verbose

Type: number
Default: 0

Control the amount of output displayed:

  • 0 Display name of operation (read/write)
  • 1 List detected components
  • 2 List component details

Authors

License

All code is licensed under The MIT License