[PLUG] tree to html

Jeme A Brelin jeme at brelin.net
Fri Dec 13 04:38:17 UTC 2002


On Thu, 12 Dec 2002, Kyle Accardi wrote:
> Jeme A Brelin wrote:
> > It seems like you could just use `find .` and check to see if the current
> > output string is a substring of the following output string and if so
> > store it as $CURRENT_DIR and indent appropriately moving down the
> > tree.  You could use sed to split on the / and see what comes out that
> > way, too.
> 
> Maybe.  I'll have to think this through more.

Well, it's ugly.

> > Did you try `tree -H`?  Was that just not what you needed?
> 
> My tree don't have no -H, what does yours do?

from `man tree`:
       -H baseHREF
              Turn  on  HTML  output,  including HTTP references.
              Useful for ftp sites.  baseHREF gives the base  ftp
              location when using HTML output. That is, the local
              directory may be `/local/ftp/pub', but it  must  be
              referenced       as       `ftp://hostname.organiza-
              tion.domain/pub' (baseHREF should  be  `ftp://host-
              name.organization.domain/').  Hint:  don't use col-
              orization and/or ANSI lines with this  option,  and
              don't give more than one directory in the directory
              list.

I'm using tree v1.3.  I have the source tarball and could probably rustle
up the URL from which I retrieved it.

> >>If I could substitute "|--" with "&nbsp", I'd be a little happier.
> > 
> > It's called sed, sir.
> 
> Yes this occured to me, and I'm hitting my sed references at the
> moment.  What's with the sir?  Is that snide for punk?

I call everyone sir, even my mother.

J.
-- 
   -----------------
     Jeme A Brelin
    jeme at brelin.net
   -----------------
 [cc] counter-copyright
 http://www.openlaw.org





More information about the PLUG mailing list