# marksnap

> CLI tool for parse markdown(.md) to HTML, PDF.

Latest version **0.9.3** (published 2015-04-15) · Apache lisence V2 license · 0 weekly downloads

## Install

```sh
npm install marksnap
pnpm add marksnap
yarn add marksnap
bun add marksnap
```

Provides the command `marksnap`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2015-04-15 |
| First published | 2015-03-17 |
| Weekly downloads | 0 |
| License | Apache lisence V2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+10 in 4 direct dependencies) |
| Install scripts | no |
| Author | AaronJan |
| Maintainers | aaronjan |
| Keywords | CLI, markdown, converter, convert |

## Links

- npm: https://www.npmjs.com/package/marksnap
- Repository: https://github.com/AaronJan/marksnap
- Issues: https://github.com/AaronJan/marksnap/issues
- npm.io page: https://npm.io/package/marksnap

## Dependencies (9)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [is_js](https://npm.io/package/is_js.md) ^0.7.1
- [lodash](https://npm.io/package/lodash.md) ^3.5.0
- [moment](https://npm.io/package/moment.md) ^2.9.0
- [bluebird](https://npm.io/package/bluebird.md) ^2.9.14
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.16.5
- [markdown](https://npm.io/package/markdown.md) ^0.5.0
- [minimist](https://npm.io/package/minimist.md) ^1.1.1
- [markdown-pdf](https://npm.io/package/markdown-pdf.md) ^5.1.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.9.3 (latest) — 2015-04-15
- 0.9.2 — 2015-03-17
- 0.9.1 — 2015-03-17
- 0.9.0 — 2015-03-17

## README

# Marksnap.js
CLI tool for parse markdown(.md) to HTML, PDF.

### Getting started

```
    npm install marksnap -g
```

**This package requires `node` version `>= 0.10`.**

### Example usage

##### Convert to `HTML`

```javascript
    marksnap /source/file.md
```

This will generate the `HTML` file in the same directory as the source file.

You can specify the output `directory` or `name` like this:

```javascript
    marksnap /source/file.md /target_directory --name html_file
```

You don't need to specify the file extension, `Marksnap` will generating that.

##### Convert to `PDF`

If you want the `PDF` version, you just simply add a parameter like this:

```javascript
    marksnap /source/file.md --pdf
```

### Notices

##### `images` in `markdown` file

If you have some `images` in your `markdown` file and image links are from
local file-system, then in `HTML` converting, just for sharing, you better use
`relative path`, and put the images and output `HTML` file in the same
directory, then you can pack this directory and send to anyone.

In `PDF` converting, you need to use `absolute path` for local images, so the
converter can read your image files, and pack them in one `PDF` file.

In next version, `Marksnap` will do this `path converting` automatically.


## TODO

~~1. [Solved]Capable of converting `.md` to `.html` and `pdf`~~

~~2. [Solved]Can specify output file path~~

~~3. [Solved]Convert to a randomly named file in the `source` directory by default~~

4. Convert local image file links automatically
5. If converting to `.html` and specified an output directory, copy all local
images to the directory
6. Write a render engine for both `HTML` and `PDF`
7. Add a little more flavors to standard `markdown`


## Special thanks to:

[markdown-js](https://github.com/evilstreak/markdown-js)

[markdown-pdf](https://github.com/alanshaw/markdown-pdf)


## License

Apache license V2. Copyright @ 2015 [AaronJan](https://github.com/AaronJan)

---
_Source: https://npm.io/package/marksnap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
