parsehtml 1.12.0 → 1.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 1.12.1 2008-12-05
2
+
3
+ * Minor updates
4
+ * Updated README file
5
+ * Cleaned up directory structure for use on github
6
+
1
7
  == 1.12.0 2008-12-05
2
8
 
3
9
  * No major enhancements
@@ -1,4 +1,4 @@
1
- = parsehtml
1
+ = ParseHTML
2
2
 
3
3
  http://parsehtml.rubyforge.org
4
4
 
@@ -6,10 +6,6 @@ http://parsehtml.rubyforge.org
6
6
 
7
7
  ParseHTML is an HTML parser which works with Ruby 1.8 and above. ParseHTML will even try to handle invalid HTML to some degree.
8
8
 
9
- == SYNOPSIS:
10
-
11
- FIX (code sample of usage)
12
-
13
9
  == REQUIREMENTS:
14
10
 
15
11
  Ruby 1.8
@@ -18,9 +14,34 @@ Ruby 1.8
18
14
 
19
15
  sudo gem install parsehtml
20
16
 
17
+ == USAGE:
18
+
19
+ require 'parsehtml'
20
+
21
+ html = %Q(
22
+ <h1>This is my HTML code</h1>
23
+ <p>Pass this <b>directly</b> into the parser</p>
24
+ )
25
+
26
+ parser = ParseHTML.new(html) # Create a new parser object
27
+ parser.next_node # traverse through the HTML nodes
28
+ parser.node # gives the current node (<h1>)
29
+ parser.node_type # gives the node type (tag)
30
+ parser.open_tags # lists any open tags ([])
31
+ parser.tag_name # gives the DOM tag name (h1)
32
+ parser.is_block_element # is this a block element? (true)
33
+ parser.is_empty_tag # is this an empty tag? (false)
34
+ parser.is_start_tag # is this a start tag? (true)
35
+ parser.tag_attributes # lists the current tags attributes ({})
36
+
37
+
38
+ == CONTRIBUTE:
39
+
40
+ git clone git://github.com/cpjolicoeur/parsehtml.git
41
+
21
42
  == DEVELOPERS:
22
43
 
23
- Craig P Jolicoeur - http://github.com/cpjolicoeur
44
+ Craig P Jolicoeur - http://craigjolicoeur.com
24
45
 
25
46
  == ACKNOWLEDGEMENTS:
26
47
 
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  class ParseHTML
5
- VERSION = '1.12.0'
5
+ VERSION = '1.12.1'
6
6
 
7
7
  # tags which are always empty (<br />, etc.)
8
8
  EMPTY_TAGS = %w(br hr input img area link meta param)
@@ -449,4 +449,4 @@ class ParseHTML
449
449
  return html
450
450
  end
451
451
 
452
- end # end class ParseHTML
452
+ end # end class ParseHTML
@@ -34,7 +34,7 @@
34
34
  <div class="sidebar">
35
35
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/parsehtml"; return false'>
36
36
  <p>Get Version</p>
37
- <a href="http://rubyforge.org/projects/parsehtml" class="numbers">1.12.0</a>
37
+ <a href="http://rubyforge.org/projects/parsehtml" class="numbers">1.12.1</a>
38
38
  </div>
39
39
  </div>
40
40
  <h2>What</h2>
@@ -74,6 +74,8 @@
74
74
  <pre>cd parsehtml
75
75
  rake test
76
76
  rake install_gem</pre>
77
+ <h2>Documentation</h2>
78
+ <p><a href="http://parsehtml.rubyforge.orb/rdoc">http://parsehtml.rubyforge.orb/rdoc</a></p>
77
79
  <h2>License</h2>
78
80
  <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
79
81
  <h2>Contact</h2>
@@ -51,6 +51,9 @@ h3. Build and test instructions
51
51
  rake test
52
52
  rake install_gem</pre>
53
53
 
54
+ h2. Documentation
55
+
56
+ "http://parsehtml.rubyforge.orb/rdoc":http://parsehtml.rubyforge.orb/rdoc
54
57
 
55
58
  h2. License
56
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsehtml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ParseHTML