https://github.com/diversen/turndown-bin
https://github.com/diversen/turndown-bin
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/diversen/turndown-bin
- Owner: diversen
- License: mit
- Created: 2024-02-04T09:24:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T21:06:00.000Z (over 2 years ago)
- Last Synced: 2024-04-14T09:08:27.448Z (over 2 years ago)
- Language: HTML
- Size: 37.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# turndown-bin
Simple CLI wrapper using `turndown` to transform `html` into `markdown`
Turndown can be found on [https://github.com/mixmark-io/turndown](https://github.com/mixmark-io/turndown)
### Install
```sh
npm install -g turndown-bin
```
### Usage
Default options:
```sh
turndown-bin --in tests/example.html --out tests/markdown.md
```
From a URL:
```sh
turndown-bin --in https://github.com --out tests/markdown.md
```
You may add a JSON config file for settings special options.
Information about the options can be found on: [https://github.com/mixmark-io/turndown/tree/master#options](https://github.com/mixmark-io/turndown/tree/master#options)
This is the default options:
```json
{
"headingStyle": "setext",
"hr": "* * *",
"bulletListMarker": "*",
"codeBlockStyle": "indented",
"fence": "```",
"emDelimiter": "_",
"strongDelimiter": "**",
"linkStyle": "inlined",
"linkReferenceStyle": "full",
"preformattedCode": false
}
```
Usage with options:
```sh
turndown-bin --in tests/example.html --out tests/markdown.md --config config.json
```
### License
MIT