For some reason, my rdoc installation isn’t generating hyperlinks for
file names. I seem to remember that this used to work, but now this
simple example:
==== t.rb ====
See docs/file.txt
class MyClass
end
···
==============
leads to just plain text in the html, not a hyperlink. Rdoc is
definitely aware of docs/file.txt, and is generating the expected html
for it, and listing it in the “files” frame. I have a pretty recent
version of rdoc:
$ rdoc -v
RDoc V1.0pr1: 2004/01/02 05:59:48 (1.2)
Should this be working?
I thought "hyperlinks, rdoc can do that now? cool!" and updated to the latest
CVS.
[ensemble] ~/p/ruby/download/rdoc $ rdoc -v
RDoc Vgs: 2003/08/22 12:33:37 (1.72)
It's not working for me, either. Did you get it working?
I have something like
...
# A Calendar is some meta-information followed by a sequence of components.
···
#
# Defined components are Event, Todo, Freebusy, Journal, and Timezone, each
# of which are represented by their own class, though they share many
# properties in common. For example, Event and Todo may both contain
# multiple Alarm components.
#
# See: ./ical-dump.rb for an example of decoding an iCalendar.
class Icalendar
...
But thats just a guess at what it should be...
Cheers,
Sam
Quoteing vjoel@PATH.Berkeley.EDU, on Tue, Jan 27, 2004 at 03:56:31AM +0900:
For some reason, my rdoc installation isn't generating hyperlinks for
file names. I seem to remember that this used to work, but now this
simple example:
==== t.rb ====
# See docs/file.txt
class MyClass
end
leads to just plain text in the html, not a hyperlink. Rdoc is
definitely aware of docs/file.txt, and is generating the expected html
for it, and listing it in the "files" frame. I have a pretty recent
version of rdoc:
$ rdoc -v
RDoc V1.0pr1: 2004/01/02 05:59:48 (1.2)
Should this be working?
Ack, forget this.
I found the docs. link:// is needed to make it realize its a hyperlink
to a local file.
Cheers,
Sam
Quoteing sroberts@uniserve.com, on Thu, Jan 29, 2004 at 11:15:16AM +0900:
···
I thought “hyperlinks, rdoc can do that now? cool!” and updated to the latest
CVS.
It’s not working for me, either. Did you get it working?
Sam Roberts wrote:
Ack, forget this.
I found the docs. link:// is needed to make it realize its a hyperlink
to a local file.
Well, that does something. It can be used to link to a file, which is
displayed in my browser as plain text. But I’d really rather link to one
of the files that I’ve marked up with the rdoc notation and which rdoc
has generated HTML for and which shows up in the Files frame.
The Rdoc readme says:
- Names of classes, source files, and any method names
containing an underscore or preceded by a hash
character are automatically hyperlinked from
comment text to their description.
I was hoping that this meant that you could link to the HTML output file
generated from one of your input files. If a file named “doc/info.txt”
is listed in the Files frame, then it would be nice if all uses of that
string were hyperlinked in the same way as in the File frame.
Joel VanderWerf wrote:
Sam Roberts wrote:
Ack, forget this.
I found the docs. link:// is needed to make it realize its a hyperlink
to a local file.
I found that this works, sort of:
link:files/doc/my_file_txt.html
if I have a file named doc/my_file.txt (relative to the dir I run rdoc
in). The -o dir is ‘doc/api/’.
The problem is that the link is displayed in my browser as
my_file_txt.html
but I’d really prefer
doc/my_file.txt
I tried using the label[link:…] construct to control this, but that
just confused my browser.
If I use the label[file:…] construct, relative file paths never seem
to work, no matter where I start them from.
Actually,
my_file[file:my_file_txt.html]
works in mozilla but not in konqueror. Go figure…
I’ve been looking at this, but it turns out to be somewhat harder that
it should be. The issue is one of relative file paths. In order to do
the hyperlinking, RDoc has to read all the source and then generate the
HTML (because there may be references to classes that haven;t been read
yet in early files). However, that also means that one class may be
defined in multiple files. The way RDoc builds its information about
class and module documentation, I can’t tell which particular file a
comment came from. Instead, I just know the list of files that
contribute to the class the comment is associated with.
However, when you say doc/my_file.rb, I need to see if I know anything
about a file called ‘my_file.rb’ in the doc subdirectory or the
directory containing the file containing the comment (phew!). I just
don’t have that information.
I’m looking to see what it would take to add it, but I’m also worried
about performance: with a large number of files and the potential for
large numbers of spurious matches on things that look like file names,
this could get slow.
Cheers
Dave
···
On Jan 28, 2004, at 21:54, Joel VanderWerf wrote:
Joel VanderWerf wrote:
Sam Roberts wrote:
Ack, forget this.
I found the docs. link:// is needed to make it realize its a
hyperlink
to a local file.
I found that this works, sort of:
link:files/doc/my_file_txt.html
Dave Thomas wrote:
Joel VanderWerf wrote:
Sam Roberts wrote:
Ack, forget this.
I found the docs. link:// is needed to make it realize its a hyperlink
to a local file.
I found that this works, sort of:
link:files/doc/my_file_txt.html
I’ve been looking at this, but it turns out to be somewhat harder that
it should be. The issue is one of relative file paths. In order to do
the hyperlinking, RDoc has to read all the source and then generate the
HTML (because there may be references to classes that haven;t been read
yet in early files). However, that also means that one class may be
defined in multiple files. The way RDoc builds its information about
class and module documentation, I can’t tell which particular file a
comment came from. Instead, I just know the list of files that
contribute to the class the comment is associated with.
However, when you say doc/my_file.rb, I need to see if I know anything
about a file called ‘my_file.rb’ in the doc subdirectory or the
directory containing the file containing the comment (phew!). I just
don’t have that information.
I’m looking to see what it would take to add it, but I’m also worried
about performance: with a large number of files and the potential for
large numbers of spurious matches on things that look like file names,
this could get slow.
Sounds painful, and not worth the effort. As a workaround, how about
some way of relabeling a link: entry? Something like:
label[link:files/doc/my_file_txt.html]
which would behave just like
link:files/doc/my_file_txt.html
(which works now) but would look like
label
in the browser?
···
On Jan 28, 2004, at 21:54, Joel VanderWerf wrote:
Quoteing vjoel@PATH.Berkeley.EDU, on Thu, Jan 29, 2004 at 03:01:45PM +0900:
However, when you say doc/my_file.rb, I need to see if I know anything
about a file called ‘my_file.rb’ in the doc subdirectory or the
directory containing the file containing the comment (phew!). I just
don’t have that information.
I’m looking to see what it would take to add it, but I’m also worried
about performance: with a large number of files and the potential for
large numbers of spurious matches on things that look like file names,
this could get slow.
Sounds painful, and not worth the effort. As a workaround, how about
I agree. Magic is nice, but some kind of explicit markup like Joel
suggests would be fine, too.
Sam
···
some way of relabeling a link: entry? Something like:
label[link:files/doc/my_file_txt.html]
which would behave just like
link:files/doc/my_file_txt.html
(which works now) but would look like
label
in the browser?
Oh… I always thought that link: already worked in a tidylink, but
you’re right. It didn’t.
It should work now.
Cheers
Dave
···
On Jan 29, 2004, at 0:01, Joel VanderWerf wrote:
Sounds painful, and not worth the effort. As a workaround, how about
some way of relabeling a link: entry? Something like:
label[link:files/doc/my_file_txt.html]
which would behave just like
link:files/doc/my_file_txt.html