Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zonuexe/ruby-github_markdown_api

GitHub Markdown API client and command-line tool
https://github.com/zonuexe/ruby-github_markdown_api

Last synced: 3 months ago
JSON representation

GitHub Markdown API client and command-line tool

Awesome Lists containing this project

README

        

GitHubMarkdownAPI
=================

GitHub's [Markdown Rendering API](http://developer.github.com/v3/markdown/) client and command-line tool.

Installation
------------

Add this line to your application's Gemfile:

gem 'github_markdown_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install github_markdown_api

Usage
-----

### Raw API

In ruby script:

```ruby
require 'github_markdown_api'

md = <
#


# AWESOME SCRIPT


#
#

It's a wonderful markup language!


#
#

    #
  • Markdown

  • #
  • reStructuredText

  • #

```

In command-line:

```sh
% cat ./awesome.md
AWESOME SCRIPT
==============

It's a wonderful markup language!

* Markdown
* reStructuredText

% github_markdown_api ./awesome.md > ./awesome.html
% cat ./awesome.html


AWESOME SCRIPT

It's a wonderful markup language!


  • Markdown

  • reStructuredText


```

### Attr API

### Advansed

```
my_md_api = GitHubMarkdownAPI::Client.new(
scheme: 'http',
host: 'your.markdown.serv',
port: 3939,
endpoints: {raw: '/md/raw'},
)

puts my_md_api(markdown)
```

Contributing
------------

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request