@biliy/ass
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@biliy/ass

forked from https://github.com/otakustay/danmaku-to-ass

Installation

pnpm add @biliy/ass

Quick Example

import fs from 'fs'
import { generateASS } from '@biliy/ass'

const filename = 'example.xml'
const xmlText = fs.readFileSync(filename, 'utf-8')
const assText = generateASS(xmlText, { filename, title: 'Quick Example' })
fs.writeFileSync(`${filename}.ass`, assText, 'utf-8')
// default subtitle style
// convert function options.substyle
{
    fontSize: [25, 25, 36],
    fontName: '黑体',
    color: '#ffffff',
    outlineColor: null,
    backColor: null,
    outline: 2,
    shadow: 0,
    bold: false,
    padding: [2, 2, 2, 2],
    playResX: 1280,
    playResY: 720,
    scrollTime: 8,
    fixTime: 4,
    opacity: 0.6,
    bottomSpace: 60,
    includeRaw: true,
    mergeIn: -1,
    block: []
}

FAQ

If you get errors about node-canvas when install, please check node-canvas docs.

/@biliy/ass/

    Package Sidebar

    Install

    npm i @biliy/ass

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    168 kB

    Total Files

    8

    Last publish

    Collaborators

    • justorez