[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Advice wanted on drawing a file tree with pic
From: |
John Gardner |
Subject: |
Re: [groff] Advice wanted on drawing a file tree with pic |
Date: |
Wed, 6 Jun 2018 22:22:37 +1000 |
> I'm trying to help out another project (quilt) with some
> non-portability in one of their man pages. Right now they're
> embedding raw UTF-8 codepoints into text to use line-drawing
> characters to depict a file hierarchy.
Oh man, I'm so glad I'm not the only one who's tried doing that with
tree(1) output...
I actually found myself in Brandan's shoes, but then I learned mandoc
doesn't do line-drawing, so I nuked the entire diagram.
Moral of the story: don't write manpages if your editor font has
spiffy-looking box-drawing symbols that seamlessly connect, it never ends
well for productivity. =(
On 6 June 2018 at 21:39, Ralph Corderoy <address@hidden> wrote:
> Hi Branden,
>
> > I'm trying to help out another project (quilt) with some
> > non-portability in one of their man pages. Right now they're
> > embedding raw UTF-8 codepoints into text to use line-drawing
> > characters to depict a file hierarchy.
>
> https://manned.org/quilt.1#head7 shows
>
> work/
> ├── patches/
> │ ├── series (list of patches to apply)
> │ ├── patch1.diff (one particular patch)
> │ ├── patch2.diff
> │ └── ...
> ├── .pc/
> │ ├── .quilt_patches (content of QUILT_PATCHES)
> │ ├── .quilt_series (content of QUILT_SERIES)
> │ ├── patch1.diff/ (copy of patched files)
> │ │ └── ...
> │ ├── patch2.diff/
> │ │ └── ...
> │ └── ...
> └── ...
>
> Indentation alone would seem sufficient to expose the hierarchy,
> but if they are intent on drawing lines.
>
> > Therefore please critique the following PIC.
>
> pic seems overkill. It seems to me they need three strings defined that
> render to the same width.
>
> VER | │
>
> TEE |-- ├──
>
> ELL '-- └──
>
> A replacement shows it covers their tree.
>
> work/
> TEE patches/
> VER TEE series (list of patches to apply)
> VER TEE patch1.diff (one particular patch)
> VER TEE patch2.diff
> VER ELL ...
> TEE .pc/
> VER TEE .quilt_patches (content of QUILT_PATCHES)
> VER TEE .quilt_series (content of QUILT_SERIES)
> VER TEE patch1.diff/ (copy of patched files)
> VER VER ELL ...
> VER TEE patch2.diff/
> VER VER ELL ...
> VER ELL ...
> ELL ...
>
> --
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy
>
>