RDoc question: How do I make a link from the README file to aspecific RDOC Page

Discussion in 'Ruby' started by Jesper Rønn-Jensen, Feb 13, 2008.

  1. VGhpcyBpcyBhbiBleGNlcnB0IGZyb20gdGhlIEFjdGl2ZVdhcmVob3VzZS1ldGwgUkVBRE1FIGZp
    bGUKCiogTXVsdGlwbGUgc291cmNlIHR5cGVzLiBDdXJyZW50IHN1cHBvcnRlZCB0eXBlczoKICAq
    IEZpeGVkLXdpZHRoIGFuZCBkZWxpbWl0ZWQgdGV4dCBmaWxlcwogICogWE1MIGZpbGVzIHRocm91
    Z2ggU0FYCiAgKiBBcGFjaGUgY29tYmluZWQgbG9nIGZvcm1hdAoKSSB3YW50IHRvIGxpbmsgdGhl
    IHdvcmQgIkZpeGVkLXdpZHRoIiB0byB0aGUgcGFnZSBFVEw6OlBhcnNlcjo6Rml4ZWRXaWR0aFBh
    cnNlcgoKSG93IGNhbiBpIGRvIHRoYXQgaW4gYW4gb3B0aW1hbCB3YXkgdG8ga2VlcCByZWFkYWJp
    bGl0eSBpbiB0aGUgc291cmNlIGZpbGU/CgoKL0plc3BlcgoKLS0gCl9fX19fX19fX19fX19fX19f
    X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCgpKZXNwZXIgUsO4bm4t
    SmVuc2VuIC8gQ2FwZ2VtaW5pIERlbm1hcmsKVGVsLiArNDUgMzk3NyA4MjIwIC8gTW9iLiArNDUg
    MjM3MyA2MjIwIC8gRmF4ICs0NSA3MDExIDIyMDEKd3d3LmRrLmNhcGdlbWluaS5jb20gLyBCbG9n
    IGh0dHA6Ly9qdXN0YWRkd2F0ZXIuZGsvCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
    X19fX19fX19fX19fX19fX19fX19fX19fX19fXwo=
     
    Jesper Rønn-Jensen, Feb 13, 2008
    #1
    1. Advertising

  2. Jesper Rønn-Jensen

    Eric Hodel Guest

    On Feb 13, 2008, at 12:10 PM, Jesper R=F8nn-Jensen wrote:

    > This is an excerpt from the ActiveWarehouse-etl README file
    >
    > * Multiple source types. Current supported types:
    > * Fixed-width and delimited text files
    > * XML files through SAX
    > * Apache combined log format
    >
    > I want to link the word "Fixed-width" to the page =20
    > ETL::parser::FixedWidthParser
    >
    > How can i do that in an optimal way to keep readability in the =20
    > source file?


    RDoc only supports links to external pages and auto-linking via method/=20=

    class names.=
     
    Eric Hodel, Feb 22, 2008
    #2
    1. Advertising

  3. Eric Hodel wrote:
    >
    > On Feb 13, 2008, at 12:10 PM, Jesper Rønn-Jensen wrote:
    >
    >> This is an excerpt from the ActiveWarehouse-etl README file
    >>
    >> * Multiple source types. Current supported types:
    >> * Fixed-width and delimited text files
    >> * XML files through SAX
    >> * Apache combined log format
    >>
    >> I want to link the word "Fixed-width" to the page
    >> ETL::parser::FixedWidthParser
    >>
    >> How can i do that in an optimal way to keep readability in the source
    >> file?

    >
    > RDoc only supports links to external pages and auto-linking via
    > method/class names.


    There is the 'link' directive in rdoc. For example:

    {README}[link:../ruby-api/files/README.html]

    The {...} part is used for the visible text of the link.

    I'm not sure if it is possible to link to a class rather than a file,
    but of course you can just link to the HTML file containing the class's
    generated rdoc.

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Feb 22, 2008
    #3
  4. Jesper Rønn-Jensen

    Eric Hodel Guest

    On Feb 22, 2008, at 12:49 PM, Joel VanderWerf wrote:
    > Eric Hodel wrote:
    >> On Feb 13, 2008, at 12:10 PM, Jesper R=F8nn-Jensen wrote:
    >>> This is an excerpt from the ActiveWarehouse-etl README file
    >>>
    >>> * Multiple source types. Current supported types:
    >>> * Fixed-width and delimited text files
    >>> * XML files through SAX
    >>> * Apache combined log format
    >>>
    >>> I want to link the word "Fixed-width" to the page =20
    >>> ETL::parser::FixedWidthParser
    >>>
    >>> How can i do that in an optimal way to keep readability in the =20
    >>> source file?

    >> RDoc only supports links to external pages and auto-linking via =20
    >> method/class names.

    >
    > There is the 'link' directive in rdoc. For example:
    >
    > {README}[link:../ruby-api/files/README.html]
    >
    > The {...} part is used for the visible text of the link.
    >
    > I'm not sure if it is possible to link to a class rather than a =20
    > file, but of course you can just link to the HTML file containing =20
    > the class's generated rdoc.


    As I recall, the names of classes are generated, so it will be =20
    difficult to have a stable link.=
     
    Eric Hodel, Feb 22, 2008
    #4
  5. Eric Hodel wrote:
    > On Feb 22, 2008, at 12:49 PM, Joel VanderWerf wrote:
    >> Eric Hodel wrote:
    >>> On Feb 13, 2008, at 12:10 PM, Jesper Rønn-Jensen wrote:
    >>>> This is an excerpt from the ActiveWarehouse-etl README file
    >>>>
    >>>> * Multiple source types. Current supported types:
    >>>> * Fixed-width and delimited text files
    >>>> * XML files through SAX
    >>>> * Apache combined log format
    >>>>
    >>>> I want to link the word "Fixed-width" to the page
    >>>> ETL::parser::FixedWidthParser
    >>>>
    >>>> How can i do that in an optimal way to keep readability in the
    >>>> source file?
    >>> RDoc only supports links to external pages and auto-linking via
    >>> method/class names.

    >>
    >> There is the 'link' directive in rdoc. For example:
    >>
    >> {README}[link:../ruby-api/files/README.html]
    >>
    >> The {...} part is used for the visible text of the link.
    >>
    >> I'm not sure if it is possible to link to a class rather than a file,
    >> but of course you can just link to the HTML file containing the
    >> class's generated rdoc.

    >
    > As I recall, the names of classes are generated, so it will be difficult
    > to have a stable link.


    The file names are stable. For example, Foo::Bar::Baz becomes

    classes/Foo/Bar/Baz.html

    Targets within that file have things like #M000155 appended to them, so
    you wouldn't want to link to them in that way.

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Feb 22, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    434
  2. PeteOlcott
    Replies:
    1
    Views:
    964
    Mukul Gandhi
    Feb 5, 2009
  3. Iwan van der Kleyn

    rdoc: how to add readme.rdoc as index.html?

    Iwan van der Kleyn, Apr 26, 2005, in forum: Ruby
    Replies:
    1
    Views:
    250
    Stefan Lang
    Apr 26, 2005
  4. Micah Cochran
    Replies:
    0
    Views:
    101
    Micah Cochran
    Sep 22, 2006
  5. Iñaki Baz Castillo
    Replies:
    3
    Views:
    159
    Eric Hodel
    Jul 28, 2009
Loading...

Share This Page