Skip to content

Releases: madeindjs/Crystagiri

0.4.0-alpha

18 Apr 15:23
Compare
Choose a tag to compare

News

0.3.5

12 Apr 13:34
Compare
Choose a tag to compare

News:

0.3.4

28 Nov 15:40
Compare
Choose a tag to compare
  • Make block return #5

0.3.2

09 Dec 12:17
Compare
Choose a tag to compare

Correction

  • correct impossibility to found a node who contains a number in its classname

0.3.1

09 Dec 12:18
Compare
Choose a tag to compare

Correction

  • correct impossibility to found a node who contains a number in its classname

0.3.0

09 Dec 12:18
Compare
Choose a tag to compare

feature

  • Add anew Crystagiri::Tag class who include a XML::Node variable and add more usefull method
  • add a benchmark between Crystagiri & Nokogiri

0.2.1

09 Dec 12:19
Compare
Choose a tag to compare

Corrections

  • Rename Crystagiri::HTML.class method as Crystagiri::HTML.where_class.
  • To be more logic, I renamed also Crystagiri::HTML.tag into Crystagiri::HTML.where_tag
  • Correct a bug when user search only a class with Crystagiri::HTML.css

0.2.0

09 Dec 12:20
Compare
Choose a tag to compare

new feature

  • Implement css query
doc.css("#main-content ol.steps") {|node| puts node}
# => <ol class="steps"> .. </ol>
doc.css("#body>quote.introduction") {|node| puts node}
# => <quote class="introduction"> .. </quote>

0.1.0

09 Dec 12:20
Compare
Choose a tag to compare

Initial release

In this first version you can only parse Html file represented by Crystagiri::HTML. You can instanciate it from :

doc = Crystagiri::HTML.new "<h1>Crystagiri is awesome!!</h1>"
doc = Crystagiri::HTML.from_file "README.md"
doc = Crystagiri::HTML.from_url "http://example.com/"

Then you can search all XML::Node by:

  • HTML tag
doc.tag("h2") { |node| puts node }
# => <h2> .. </h2>
# => <h2> .. </h2>
# => <h2> .. </h2>
  • HTML id
puts doc.at_id("main-content") 
# => <div id="main-content"> ... </div>
  • HTML class attribute
doc.class("summary") { |node| puts node }
# => <div class="summary"> .. </div>
# => <div class="summary"> .. </div>
# => <div class="summary"> .. </div>