Skip to content
/ cf2md Public
generated from un-ts/lib-boilerplate

Transform from confluence flavored HTML to Markdown with enhanced features.

License

Notifications You must be signed in to change notification settings

un-ts/cf2md

Repository files navigation

cf2md

GitHub Actions Codecov Codacy Grade type-coverage npm GitHub Release

David Peer David David Dev

Conventional Commits Renovate enabled JavaScript Style Guide Code Style: Prettier changesets

Transform from confluence flavored HTML to Markdown with enhanced features.

TOC

Usage

Install

# npm
npm i -g cf2md

# pnpm
pnpm i -g cf2md

# yarn
yarn global add cf2md

CLI

Usage: cf2md [options] [input]

Arguments:
  input                Input HTML codes

Options:
  -V, --version        output the version number
  -i, --input <path>   Input HTML file
  -o, --output <path>  Output Markdown file
  -h, --help           display help for command

API

import fs from 'fs'
import { cf2md } from 'cf2md'

// string
const markdown = cf2md(html)

// stream
cf2md(fs.createReadStream(htmlFile)).pipe(fs.createWriteStream(mdFile))

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT © JounQin@1stG.me