Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ytbryan/mdrb
Create and manage multiple markdown documents easily.
https://github.com/ytbryan/mdrb
markdown ruby
Last synced: about 4 hours ago
JSON representation
Create and manage multiple markdown documents easily.
- Host: GitHub
- URL: https://github.com/ytbryan/mdrb
- Owner: ytbryan
- License: mit
- Created: 2020-11-30T03:21:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-01T06:28:23.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T13:48:51.942Z (20 days ago)
- Topics: markdown, ruby
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# md.rb
Create and manage multiple markdown documents easily.
Some of the key features are:
0. Having a simple syntax and api
1. Generate, read, update and delete multiple markdown
2. Get json from markdown# Install
```
gem install mdrb
``````ruby
require 'mdrb'
```# usage
Create markdown
```ruby
MD.create("first", "# Hello") #first.md
MD.create("first document", "# Hello") #first-document.md
```Create multiple markdown
```ruby
MD.create_many(["first","second"], ["# first","# second"]) #first.md second.mdMD.create_many(["first document","second document"], ["# first","# second"]) #first-document.md second.md
```
Get json from markdown
```ruby
MD.create("first", "# first")
puts json = MD.to_json("first")
```Update markdown
```ruby
MD.update(path, content)
MD.update_on(which_line, path, content)
MD.update_many()
```Delete markdown
```ruby
MD.create_many(["first","second"], ["# first", "# second"])
MD.delete("first")
MD.delete_many(["first", "second"])
```Read markdown
```ruby
MD.read()
MD.read_many()
```# Testing
rspec
# license
MIT | [email protected]