https://github.com/diversen/url-to-markdown
Convert gutenberg html to markdown
https://github.com/diversen/url-to-markdown
Last synced: over 1 year ago
JSON representation
Convert gutenberg html to markdown
- Host: GitHub
- URL: https://github.com/diversen/url-to-markdown
- Owner: diversen
- Created: 2023-03-27T16:28:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-31T17:47:33.000Z (over 3 years ago)
- Last Synced: 2025-02-07T22:28:33.444Z (over 1 year ago)
- Language: JavaScript
- Size: 114 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# url-to-markdown
Read an online html file and convert it to markdown.
## Install
```bash
git clone https://github.com/diversen/url-to-markdown.git
cd url-to-markdown
npm install
```
## Usage
```bash
# fetching The Divine Comedy by Dante Alighieri
./url-to-markdown.js https://www.gutenberg.org/files/1001/1001-h/1001-h.htm#CantoI.I > devine_comedy.md
more devine_comedy.md
```
The code is just a single script [url-to-markdown.js](url-to-markdown.js).
`Puppeteer` is used for the scraping. `Turndown` is used for converting html to markdown.
## License
MIT © [Dennis Iversen](https://github.com/diversen)