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

https://github.com/v2e4lisp/rp

a tiny language compiles to html....
https://github.com/v2e4lisp/rp

Last synced: 11 months ago
JSON representation

a tiny language compiles to html....

Awesome Lists containing this project

README

          

# Rp

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

gem 'rp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rp

## Usage

```haml
html!
head
script type: "text/javascript", src: "http://slkdfksja.js"
body
div#content data_para: "hello world"
p.first "first p"
p.second-p#special-p
"special p"
- a = "username"
p
- b = "---------------x--------------"
= b
- a.split("").each do |x|
font x
- end
p
"helloworld"
div.comments.hahaha
p.a-comment#no-comment "no comments yet!"
```

**FIRST, converted to ruby code**

```ruby
html! do
head do
script type: "text/javascript", src: "http://slkdfksja.js"
end
body do
@id = 'content'
div data_para: "hello world" do
@cls = 'first'
p "first p"
@cls = 'second-p'
@id = 'special-p'
p do
"special p"
end
a = "username"
p do
b = "---------------x--------------"
self.== b
a.split("").each do |x|
font x
end
end
p do
"helloworld"
end
@cls = 'comments hahaha'
div do
@cls = 'a-comment'
@id = 'no-comment'
p "no comments yet!"
end
end
end
end

```

**OUTPUT html**

```html








first p



special p



---------------x--------------

u


s


e


r


n


a


m


e



helloworld




no comments yet!




```

## 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