PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > rdoc/ri feature request
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
rdoc/ri feature request

Réponse
 
LinkBack Outils de la discussion
Vieux 01/12/2007, 19h09   #1
John Joyce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut rdoc/ri feature request

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).

  Réponse avec citation
Vieux 01/12/2007, 20h50   #2
Joel VanderWerf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rdoc/ri feature request

John Joyce 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 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
<title>Gem Docs</title>
<table border="1">
<tr><th>Name</th><th>Title</th><th>Gem Docs</tr>
<tr id=table1>
<td id="name"></td>
<td id="title"></td>
<td><a id="gemdocs"></a></td>
</tr>
</table>
END

links = Dir['*/rdoc/index.html']

linkdata = links.sort_by{|s|s.downcase}.map do |link|
{
:name => link[/(.*?)\//,1],
:title =>
File.open(link).grep(/<title>/)[0][/<title>(.*?)<\/title>/,1],
:gemdocs => a(:href=>link) { link }
}
end

data = {
:table1 => linkdata
}

tmpl.prettyprint = true
tmpl.expand(File.open("index.html", "w"), data)

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h44.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,56249 seconds with 10 queries