holmes
Holmes
Holmes adds a searching layer on top of Gumbocr.
Installation
Add it to Projectfile
deps do
github "zamith/holmes"
end
Usage
require "holmes"
all_with_tag
Get all the elements with a certain tag:
Holmes.parse("<p>Paragraph</p>").all_with_tag("p")
text
Gets the text for a certain node:
Holmes.parse("<p>Paragraph</p>").all_with_tag("p").first.text
# Paragraph
open
Downloads and parses an HTML document from an URL:
Holmes.open("http://rubyconf.pt").all_with_tag("p").first.text
# 14-15 September
Development
Clone and install dependencies with:
$ git clone git@github.com:zamith/gumbocr.git
$ cd gumbocr
$ crystal deps
Contributing
- Fork it ( https://github.com/zamith/holmes/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Zamith Zamith - creator, maintainer
Repository
holmes
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- over 9 years ago
- May 30, 2015
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 18:16:14 GMT
Languages