md.rb

Create and manage multiple markdown documents easily.

Some of the key features are:

  1. Having a simple syntax and api
  2. Generate, read, update and delete multiple markdown
  3. Get json from markdown

Install

gem install mdrb
require 'mdrb'

usage

Create markdown

MD.create("first", "# Hello") #first.md
MD.create("first document", "# Hello") #first-document.md

Create multiple markdown

MD.create_many(["first","second"], ["# first","# second"]) #first.md second.md

MD.create_many(["first document","second document"], ["# first","# second"]) #first-document.md second.md

Get json from markdown

MD.create("first", "# first")
puts json = MD.to_json("first")

Update markdown

MD.update(path, content)
MD.update_on(which_line, path, content)
MD.update_many()

Delete markdown

MD.create_many(["first","second"], ["# first", "# second"])
MD.delete("first")
MD.delete_many(["first", "second"])

Read markdown

MD.read()
MD.read_many()

Testing

rspec

license

MIT | [email protected]