Re: [RECIPE] Pull the trigger on Mister Sed? (MR macro migration)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 15, 2024 at 01:10:45AM +0100, Alejandro Colomar wrote:
> Hi Branden,
> 
> On Sun, Jan 14, 2024 at 07:22:47PM +0100, Alejandro Colomar wrote:
> > Hi MR. sed,
> > 
> > On Sun, Jan 14, 2024 at 09:42:25AM -0600, G. Branden Robinson wrote:
> ...
> > > I'm attaching two scripts, "MR-migrate.sh" and "MR.sed".  Drop them in
> > > the directory of your man-pages checkout, and run the first with a POSIX
> > > shell.
> ...
> > > Signed-off-by: "G. Branden Robinson" <g.branden.robinson@xxxxxxxxx>
> > > 
> > > Regards,
> > > Branden
> > > 
> > > [0] https://lore.kernel.org/linux-man/20231025185341.mqvn7qlm3iby4zgm@illithid/
> > > [1] https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00001.html
> > > [2] https://repology.org/project/groff/versions
> > > [3] You can of course find out how in groff_man(7).
> > 
> > 
> > > # Handle simplest cases: ".BR foo (1)" and ".IR foo (1)".
> > > s/^.[BI]R \(\\%\)*\([.@_[:alnum:]\\-]\+\) (\([1-9a-z]\+\))$/.MR \2 \3/
> > > # Handle case: trailing punctuation, as in ".IR foo (1),".
> > > s/^.[BI]R \(\\%\)*\([.@_[:alnum:]\\-]\+\) (\([1-9a-z]\+\))\([^[:space:]]\+\)$/.MR \2 \3 \4/
> > > # Handle case: leading punctuation, as in ".RI ( foo (1)".
> > > s/^.R[BI] \(\\%\)*\([^[:space:]]\+\) \([.@_[:alnum:]\\-]\+\) (\([1-9a-z]\+\))\([^[:space:]]\+\)$/\\%\2\\c\n.MR \3 \4 \5/
> > > # Handle case: 3rd+ arguments or trailing comments.  This case is rare
> > > # and will require manual fixup if there are 4+ arguments to MR.  Use
> > > # groff -man -rCHECKSTYLE=1 to have them automatically reported.
> > > s/^.[BI]R \(\\%\)*\([.@_[:alnum:]\\-]\+\) (\([1-8a-z]\+\))\( .*\)/.MR \2 \3\4/
> > 
> > Recipe applied.  
> > <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=d02c2e2a15b6b9f5c35d1bef150e23cff27372d0>
> 
> I was checking the book script from Deri (Deri, could you simplify the

(Forgot to send to Deri.)

> script now that we use MR?  So dropping support for old BR?), and
> noticed about syscalls.2, which has man-page references inside a tbl.
> 
> That hasn't been migrated by the script.  I guess you'd want to also
> migrate those, right, Branden?
> 
> Have a lovely night,,
> Alex
> 
> > It's still not in master, so if you want to tweak the commit message,
> > feel free to suggest an edit.  I'll push tomorrow to master.
> 
> BTW, I've amended now the author, which I forgot.
> <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib>

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux