Newline Pending Merge

    @visbot/webvsc

    2.3.0 • Public • Published

    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

    Install

    npm i @visbot/webvsc

    DownloadsWeekly Downloads

    9

    Version

    2.3.0

    License

    MIT

    Unpacked Size

    156 kB

    Total Files

    17

    Last publish

    Collaborators

    • grandchild
    • idleberg