JSPM

@mtillmann/chapconv

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q41940F
  • License MIT

simple cli tool to convert between chapter formats

Package Exports

  • @mtillmann/chapconv
  • @mtillmann/chapconv/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mtillmann/chapconv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

chapconv

Convert chapters between different formats. See @mtillmann/chapters for details on the supported formats.

Installation

npm install -g @mtillmann/chapconv
# then use
chapconv --help

or use the npx command to run the tool without installation:

npx @mtillmann/chapconv@latest --help

convert

Usage: chapconv convert [options]

Convert input to given format

Options:
  -V, --version             output the version number
  -i, --input [input]       Input file (default: "stdin")
  -o, --output [output]     Output file (default: "stdout")
  -f, --format <format>     Output format (choices: "applechapters", "applehls",
                            "audible", "chaptersjson", "ffmetadata",
                            "matroskaxml", "mkvmergesimple", "mkvmergexml",
                            "mp4chaps", "podcastpage", "podigee", "podigeetext",
                            "podlovejson", "psc", "pyscenedetect", "scenecut",
                            "shownotes", "shutteredl", "spotifya", "spotifyb",
                            "transistorfm", "vorbiscomment", "webvtt",
                            "youtube", default: "chaptersjson")
  -p, --pretty              Pretty print output (where applicable)
  -r, --replace             replace the output file if it exists
  --input-format <format>   Explicitly specify input format (choices:
                            "applechapters", "applehls", "audible",
                            "chaptersjson", "ffmetadata", "ffmpeginfo",
                            "matroskaxml", "mkvmergesimple", "mkvmergexml",
                            "mp4chaps", "podcastpage", "podigee", "podigeetext",
                            "podlovejson", "psc", "pyscenedetect", "scenecut",
                            "shownotes", "shutteredl", "spotifya", "spotifyb",
                            "transistorfm", "vorbiscomment", "webvtt",
                            "youtube")
  -e, --extras <extras...>  Extra output format options (key=value), see
                            https://github.com/Mtillmann/chapters?tab=readme-ov-file#chapterjson-tostring-options
  -h, --help                display help for command

detect

Usage: chapconv detect [options]

Detect format of input

Options:
  -i, --input [input]  Input file (default: "stdin")
  -h, --help           display help for command

reading and writing

chapconv convert < input.xml > output.json
# or
chapconv convert -o output.json < input.xml
# or
cat input.xml | chapconv convert > output.json
# or
cat input.xml | chapconv convert -o output.json
# or
chapconv convert -i input.xml > output.json
# or
chapconv convert -i input.xml -o output.json