On Aug 27, 2013, at 15:23, Charles H. [email protected]
wrote:
I’m using rdoc on code that I was in the process of writing. I got the result
with ruby1.9.1 and have just installed ruby 2.0.0p247 (2013-06-27 revision 41674)
[x86_64-linux]
Actually, with yesterday’s install (Rdoc 4.0.0, the problems seem to have
changed, becoming extremely much less critical.
…dala1:~/projects/Ruby/cells$ rdoc --html -a -o rdoc --debug cellsdb.rb
yields:
invalid options: --html
but seems to generate the correct output. (I’m sure that was a valid option
the last time I checked…but it’s not listed now.)
You were probably using RDoc 2.x or 3.x. One of those had a zero
division error and supported the --html option. RDoc ignores invalid
options by default, but does warn about them.
Now the problem is essentially simple. I can’t stand reading text on a black
background, and darkfish uses that. And a search on Google hasn’t shown me any
examples of alternatives. Fivefish, e.g., is mentioned, but I haven’t seen any
examples. Allison looks good, but seems to have disappeared. Jamis looks good,
but the install instructions don’t work. (Can’t find jamis.rb) Another by Dave
Thomas is unmaintained and only known to work with rdoc 2.3.0.
You can provide an override stylesheet, here’s one with some poor color
choices using the --template-stylesheets option:
$ rdoc --template-stylesheets my.css test.rb
$ cat my.css
pre {
color: black;
background: white;
}
.ruby-constant { color: black; font-weight: bold }
.ruby-keyword { color: black }
.ruby-ivar { color: olive }
.ruby-operator { color: navy }
.ruby-identifier { color: navy }
.ruby-node { color: black }
.ruby-comment { color: red }
.ruby-regexp { color: purple }
.ruby-value { color: green }
Here’s a test file to use with it:
$ cat test.rb
This is a test of white on black styling
# this is a syntax test
def my_method
@var + 1
end
CONSTANT = /regexp/ =~ “some #{string}”
class C
end
You can set your stylesheet overrides for all HTML generation with the
RDOCOPT environment variable, see rdoc --help
So now (i.e., as of yesterday night’s install) the problem is not precisely with
RDoc, but with the available templates. I find darkfish unreadable (well, where
it’s text against a black background, but that’s enough).
ARE there any working alternatives? Preferably something that looks sort of
like jamis ( Buckblog: RDoc Template ) or Allison
(Allison: New Template for RDoc-Produced Documentation)
It seems that Jamis’ template has disappeared from the internet and
Allison is deprecated.
I’ll never be able to pick a color scheme and layout that everyone is
happy with, but I am open to updating or replacing the current scheme.
For the next release of RDoc I’m working on a modified layout that will
have a shorter sidebar for class pages.
Here’s a work-in-progress example page that needs changes to the style
before it is releasable:
http://rubygems.rubyforge.org/rubygems-update/Gem/Package.html