Changeset 102

Show
Ignore:
Timestamp:
01/31/2007 01:32:30 (22 months ago)
Author:
why
Message:
  • Rakefile: generate RDoc with the README at front.
  • README: a bit more initial comments.
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/README

    r65 r102  
    1313works. 
    1414 
     15== An Overview 
     16 
     17Let's clear up what Hpricot is. 
     18 
     19# Hpricot is *a standalone library*.  It requires no other libraries.  Just Ruby! 
     20# While priding itself on speed, Hpricot *work hard to sort out bad HTML* and 
     21  pays a small penalty in order to get that right.  So that's slightly more important 
     22  to me than speed. 
     23# *If you can see it in Firefox, then Hpricot should parse it.*  That's 
     24  how it should be!  Let me know the minute it's otherwise. 
     25# Primarily, Hpricot is used for reading HTML and tries to sort out troubled 
     26  HTML by having some idea of what good HTML is.  Some people still like to use 
     27  Hpricot for XML reading, but *remember to use the Hpricot::XML() method* for that! 
     28 
    1529== The Hpricot Kingdom 
    1630 
     
    2135* http://code.whytheluckystiff.net/svn/hpricot/trunk is the main Subversion 
    2236  repository for Hpricot.  You can get the latest code there. 
     37* http://code.whytheluckystiff.net/doc/hpricot is the home for the latest copy of 
     38  this reference. 
    2339* See COPYING for the terms of this software. (Spoiler: it's absolutely free.) 
    2440 
     
    3955candidate build here: 
    4056 
    41   $ gem install hpricot --source code.whytheluckystiff.net 
     57  $ gem install hpricot --source http://code.whytheluckystiff.net 
    4258 
    4359The development gem is usually in pretty good shape actually.  You can also 
     
    241257*Also, :fixup_tags is canceled out by the :xml option.*  This is because :fixup_tags makes assumptions based how HTML is 
    242258structured.  Specifically, how tags are defined in the XHTML 1.0 DTD. 
    243  
    244 == Digging Around for More Handy Methods 
    245  
    246 If you're looking around for more helpful methods to  
  • trunk/Rakefile

    r63 r102  
    88 
    99NAME = "hpricot" 
    10 REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil 
     10REV = `svn info`[/Revision: (\d+)/, 1] rescue nil 
    1111VERS = ENV['VERSION'] || "0.4" + (REV ? ".#{REV}" : "") 
    1212CLEAN.include ['ext/hpricot_scan/*.{bundle,so,obj,pdb,lib,def,exp}', 'ext/hpricot_scan/Makefile',  
    1313               '**/.*.sw?', '*.gem', '.config'] 
     14RDOC_OPTS = ['--quiet', '--title', 'The Hpricot Reference', '--main', 'README', '--inline-source'] 
    1415 
    1516desc "Does a full compile, test run" 
     
    4344Rake::RDocTask.new do |rdoc| 
    4445    rdoc.rdoc_dir = 'doc/rdoc' 
    45     # rdoc.options += RDOC_OPTS 
    46     # rdoc.template = "extras/flipbook_rdoc.rb" 
     46    rdoc.options += RDOC_OPTS 
    4747    rdoc.main = "README" 
    48     rdoc.title = "Hpricot Documentation" 
    4948    rdoc.rdoc_files.add ['README', 'CHANGELOG', 'COPYING', 'lib/**/*.rb'] 
    5049end 
     
    5655        s.platform = Gem::Platform::RUBY 
    5756        s.has_rdoc = true 
     57        s.rdoc_options += RDOC_OPTS 
    5858        s.extra_rdoc_files = ["README", "CHANGELOG", "COPYING"] 
    5959        s.summary = "a swift, liberal HTML parser with a fantastic library"