0.4.2 • Published 12 months ago

fj-sub-convertor v0.4.2

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

fj-sub-convertor

---
title: Overview
---
flowchart LR
  reader ---> parser ---> convertor ---> printer ---> writer

Installation

$ yarn add fj-sub-convertor
$ npm install fj-sub-convertor

Usage

Usage: fj-sub-convertor [options]

FJ subtitle convertor

Options:
  -V, --version                    output the version number
  -i, --input <input_file_path>    Input file path (.json) (default: "subtitle.json")
  -o, --output <output_file_path>  Output file path (default: "output.lrc")
  -t, --type <type>                Output type (choices: "lrc", "srt", "color-srt", "ass", default: "lrc")
  --font-size <number>             Subtitle font size (ass only) (default: 24)
  --align <number>                 Subtitle alignment (ass only) (default: 2)
  --max-char <number>              Max characters per line (ass only) (default: 12)
  -h, --help                       display help for command

Development

# Install dependencies
$ npm install

# Build
$ npm run build


# Quick debug
$ ts-node src/index.ts

# Debug NPM package
$ cd fj-sub-convertor/
$ npm link
$ cd example-project
$ npm link fj-sub-convertor
$ fj-sub-convertor
# Permission issue, npm unlink first and the npm link
$ npm unlink fj-sub-convertor
$ npm link fj-sub-convertor

Debug

// launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "runtimeArgs": ["-r", "ts-node/register"],
      "request": "launch",
      "name": "Launch Program",
      "args": [
        "${workspaceFolder}/src/index.ts",
        "-i",
        "/xxxxxx/yyyyy/subtitle.json", // ! Using absolute path
        "-l",
        "/xxxxxx/yyyyy/output.lrc" // ! Using absolute path
      ]
    }
  ]
}

References

0.4.1

12 months ago

0.4.2

12 months ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago