Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Make paraparser recognize href links

open
Andy Robinson
platypus (4)
5
2002-04-17
2002-04-02
Chris McDonough
No

This is probably better as a maillist post, but I'm
having trouble signing up to egroups (it doesn't want
to send me a confirmation mail). :-(

I'd like to be able to have platypus recognize some
symbology for external like references. To do so, I'd
like to be able to modify the RL paraparser to
recognize inline external links <a href="">link</a>.
As far as I can tell from the source, after modifying
the parser to create a new kind of "link" paragraph
fragment I'd also need to maybe modify the playpus
Paragraph class' drawPara method and some of the
ParaLines/FragLines logic to be able to identify the
new kind of fragment and draw a link rectangle around
it using the canvas' linkURL method.

The problem is that I don't know at what point during
processing to call linkURL or how I know where in the
current coordinate system that the URL-bearing
fragment will be drawn and how big it will be when it
is drawn. :-(

Can anyone from ReportLab or otherwise provide some
narrative as to how you might go about doing this in
broad strokes, ala a "hook this method here", "get the
coordinates from here" and "subclass from this class"
kind of explanation.

Many thanks!

Discussion

    • labels: --> platypus
    • assigned_to: nobody --> andy_robinson
     
  • Logged In: YES
    user_id=12190

    Andy, maybe you can comment on this?