I know it’s selfish, but…
I would like rdoc to have the ability to build a landing page/portal
locally accessible in a browser.
That way there would be quick, easy to navigate docs available from
one aggregate place.
In addition to this, the ability to configure it to rebuild at
intervals/events. For example, after a gem is installed, or every
Monday morning at 3:00 would be convenient. Ideally, this would be
daemonized and maybe simply take advantage of platform-available
tools (such as chron on *nix’s and whatever is available on Windows).
John J. wrote:
I know it’s selfish, but…
I would like rdoc to have the ability to build a landing page/portal
locally accessible in a browser.
That way there would be quick, easy to navigate docs available from one
aggregate place.
In addition to this, the ability to configure it to rebuild at
intervals/events. For example, after a gem is installed, or every Monday
morning at 3:00 would be convenient. Ideally, this would be daemonized
and maybe simply take advantage of platform-available tools (such as
chron on *nix’s and whatever is available on Windows).
There’s the gem server (“gem help server” for details), but I prefer a
static page, so I just do the following after updating or installing
gems and cleanup:
$ cat gem-update-docs
#!/usr/bin/env ruby
require “amrita/template”
include Amrita
Dir.chdir “/usr/local/lib/ruby/gems/1.8/doc”
tmpl = TemplateText.new <<END
Gem DocsName | Title | Gem Docs |
---|---|---|
links = Dir[’*/rdoc/index.html’]
linkdata = links.sort_by{|s|s.downcase}.map do |link|
{
:name => link[/(.?)//,1],
:title =>
File.open(link).grep(//)[0][/(.?)</title>/,1],
:gemdocs => a(:href=>link) { link }
}
end
data = {
:table1 => linkdata
}
tmpl.prettyprint = true
tmpl.expand(File.open(“index.html”, “w”), data)