#!/usr/bin/perl # reorganize frontmatter use warnings; use strict; use Path::Tiny; use HTML::HTML5::Entities; my $infile = shift; my $outfile = shift || $infile; $_ = path($infile)->slurp_utf8; # swap sections → Copyright, TOC, Foreword, Preface s|^((?:.*?\n)?)(= Preface(?:(?!\n=).)*\n)(= Copyright(?:(?!\n=).)*\n)(= Table(?:(?!\n=).)*\n)(= Foreword(?:(?!\n=).)*\n)(=.*)$|$1$3$4$5$2$6|s; # drop section Copyright s|^((?:.*?\n)?)(= Copyright(?:(?!\n=).)*\n)(=.*)$|$1$3|s; path($outfile)->spew_utf8($_); 1; notmuch Git repository'/>
summaryrefslogtreecommitdiff
path: root/tags/d1/45/E1kuLh7-000GlG-7t@fasolo.debian.org/inbox
diff options
context:
space:
mode:
Diffstat (limited to 'tags/d1/45/E1kuLh7-000GlG-7t@fasolo.debian.org/inbox')
-rw-r--r--tags/d1/45/E1kuLh7-000GlG-7t@fasolo.debian.org/inbox0
1 files changed, 0 insertions, 0 deletions