rra / podlators

Format POD source into various output formats
https://www.eyrie.org/~eagle/software/podlators/
Other
6 stars 11 forks source link

Optional printing of target URLs in groff output #30

Open Code7R opened 5 months ago

Code7R commented 5 months ago

Hi all,

we use pod2man to maintain a big portion of icewm documentation. For plain convenience, I would like to have the hyperlink rendering also add the pointed URL to the nroff version. Maybe it could also allow to specify characters which surround it.

Idea:

--printlink=surroundings append the link target to the link name surrounded by two characters specied as surroundings

With that, --printlink=<> would convert -L<foo|http://bar> to foo <http://bar>.

Opinions? Is there a good existing way to do that? Patches wanted?

rra commented 5 months ago

This is the default behavior, so I'm not sure why you're not seeing it already.

 % cat foo.pod 
=head1 Test

L<foo|https://example.com/>
% pod2man ./foo.pod | nroff -man -
FOO(1)                User Contributed Perl Documentation               FOO(1)

Test
       foo <https://example.com/>

perl v5.38.2                      2024-04-04                            FOO(1)