0.5.0 • Published 8 years ago

md-to-couch v0.5.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

md-to-couch

Converts a folder of markdown files into CouchDB compatible JSON.

How to use

npm i md-to-couch

import * as mdToCouch from "md-to-couch";
const couchJson = mdToCouch({
    dirname: __dirname,
    parseDate: true
    });

Options

  • dirname String: path to the list of markdown files. Your files must have .md extension. They can have front matter YAML, which will also be parsed.
  • parseDate Boolean: enable parsing of filenames for potential date and time. Often markdown files would include datetime info which can be useful to parse automatically.

Batch import documents into CouchDB

You can use the resulting JSON to batch import documents into CouchDB. Let's say we have CouchDB running on localhost. To do that you can send POST request to http://127.0.0.1:5984/[db_name]/_bulk_docs with the body containing resulting JSON.

0.5.0

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago