diff options
author | EuAndreh <eu@euandre.org> | 2021-07-23 10:34:46 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-07-23 10:37:09 -0300 |
commit | 94ec6277e47878485bc44bd753129c516c044f8d (patch) | |
tree | 22243ff344c7b55975554feba472a6f61b1ff4aa | |
parent | Makefile: Use $(PREFIX) directly over the $(MANPREFIX) variable (diff) | |
download | git-permalink-94ec6277e47878485bc44bd753129c516c044f8d.tar.gz git-permalink-94ec6277e47878485bc44bd753129c516c044f8d.tar.xz |
aux/workflow/TODOs.sh: Remove dependency on Perl
I've replaced the Perl usage for doing regexes with plain sed.
Implements #task-bf65e50a-b424-9fce-ba8e-fcd6b3bf1c7a.
Also:
- README.md: remove Perl from the list of tools required;
- po/LC_MESSAGES/README.en.md/*.po: translate the update on required
tools;
- aux/guix/manifest.scm: remove Perl package.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | aux/guix/manifest.scm | 1 | ||||
-rwxr-xr-x | aux/workflow/TODOs.sh | 36 | ||||
-rw-r--r-- | po/LC_MESSAGES/README.en.md/eo.po | 16 | ||||
-rw-r--r-- | po/LC_MESSAGES/README.en.md/fr.po | 17 | ||||
-rw-r--r-- | po/LC_MESSAGES/README.en.md/pt.po | 14 |
6 files changed, 46 insertions, 40 deletions
@@ -87,7 +87,7 @@ The directory structure of the repository is: Extra tools used for development are: - [ShellCheck] for validating scripts; - [po4a], [mdpo] and [gettext] for i18n and l10n support; -- [pandoc] and Perl for generating the documentation HTML and website. +- [pandoc] for generating the documentation HTML and website. [ShellCheck]: https://www.shellcheck.net/ [po4a]: https://po4a.org/index.php.en diff --git a/aux/guix/manifest.scm b/aux/guix/manifest.scm index 91a1b84..f4799bf 100644 --- a/aux/guix/manifest.scm +++ b/aux/guix/manifest.scm @@ -10,7 +10,6 @@ git gawk make - perl shellcheck pandoc gettext diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh index 96cb064..d875e0e 100755 --- a/aux/workflow/TODOs.sh +++ b/aux/workflow/TODOs.sh @@ -39,21 +39,21 @@ if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi -TODOS_ADD_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE|WONTFIX) (.*) \{#(.*?)\}(.*)$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\4\n<pre class="header-anchor" id="\3">#\3<\/pre>\n/' -TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g' -TODOS_CLEANUP_REGEX1='s/(<a><a)/<a/' -TODOS_CLEANUP_REGEX2='s/<\/a><\/a>/<\/a>/' -sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ - -e "s:@PROJECT@:$PROJECT:g" \ - -e "s:@MAILING_LIST@:$MAILING_LIST:g" \ - -e "s:@TLD@:$TLD:g" \ - < aux/workflow/preamble.md | \ - printf \ - '%s\n\n' \ - "$(cat - TODOs.md)" | \ - perl -pe "$TODOS_ADD_REGEX" | \ - perl -pe "$TAGS_REGEX" | \ +# shellcheck disable=1004 +IDS_REGEX='s:^## \(TODO\|DOING\|WAITING\|MEETING\|INACTIVE\|NEXT\|CANCELLED\|DONE\|WONTFIX\) \(.*\) {#\(.*\)}\(.*\)$:## <a href="#\3"><span class="\1">\1</span> \2</a>\4\ +<pre class="header-anchor" id="\3">#\3</pre>\ +:g' +TAGS_REGEX='s|tag:\([a-z0-9-]*\)|<span class="tag">\1</span>|g' + +cat aux/workflow/preamble.md TODOs.md | \ + sed \ + -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ + -e "s:@PROJECT@:$PROJECT:g" \ + -e "s:@MAILING_LIST@:$MAILING_LIST:g" \ + -e "s:@TLD@:$TLD:g" \ + -e "$IDS_REGEX" \ + -e "$TAGS_REGEX" | \ pandoc \ --toc \ --highlight-style pygments \ @@ -64,8 +64,8 @@ sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ -r commonmark \ -w html \ -H aux/workflow/favicon.html \ - -H aux/workflow/style.css \ - | \ - perl -pe "$TODOS_CLEANUP_REGEX1" | \ - perl -pe "$TODOS_CLEANUP_REGEX2" \ + -H aux/workflow/style.css | \ + sed \ + -e 's:<a><a:<a:g' \ + -e 's:</a></a>:</a>:g' \ > "$OUTDIR/TODOs.html" diff --git a/po/LC_MESSAGES/README.en.md/eo.po b/po/LC_MESSAGES/README.en.md/eo.po index d6720f2..0ce9115 100644 --- a/po/LC_MESSAGES/README.en.md/eo.po +++ b/po/LC_MESSAGES/README.en.md/eo.po @@ -109,12 +109,6 @@ msgstr "" "[po4a][po4a], [mdpo][mdpo] and [gettext][gettext] for internaciigo kaj " "lokigo;" -#: README.en.md:block 20 (unordered list) -msgid "" -"[pandoc][pandoc] and Perl for generating the documentation HTML and website." -msgstr "" -"[pandoc][pandoc] kaj Perl por generi la dokumentadon kaj retejon HTML." - #: README.en.md:block 25 (paragraph) msgid "" "Send contributions to the [mailing list][mailing list] via [`git send-" @@ -358,7 +352,7 @@ msgid "`src/`: main source code for the project;" msgstr "`src/`: ĉefa fontkodo de la projekto;" msgid "`tests/`: integration tests for the project." -msgstr "`tests /`: integriĝaj testoj por la projekto. " +msgstr "`tests /`: integriĝaj testoj por la projekto." msgid "" "`aux/`: personal scripts and helpers I've vendored in to ensure the " @@ -378,6 +372,14 @@ msgid "" msgstr "" "[`git-permalink.1`][`git-permalink.1`] ([en][en2], [pt][pt2], [fr][fr2])." +msgid "[pandoc][pandoc] for generating the documentation HTML and website." +msgstr "[pandoc][pandoc] por generi la dokumentadon kaj retejon HTML." + +#~ msgid "" +#~ "[pandoc][pandoc] and Perl for generating the documentation HTML and website." +#~ msgstr "" +#~ "[pandoc][pandoc] kaj Perl por generi la dokumentadon kaj retejon HTML." + #~ msgid "" #~ "The documentation is available via installed manpages or online: [`git-" #~ "permalink.1`][`git-permalink.1`] ([pt][pt2], [fr][fr2], [eo][eo2])." diff --git a/po/LC_MESSAGES/README.en.md/fr.po b/po/LC_MESSAGES/README.en.md/fr.po index cee5e6b..6921576 100644 --- a/po/LC_MESSAGES/README.en.md/fr.po +++ b/po/LC_MESSAGES/README.en.md/fr.po @@ -114,13 +114,6 @@ msgstr "" "[po4a][po4a], [mdpo][mdpo] et [gettext][gettext] pour internationalisation " "et localisation;" -#: README.en.md:block 20 (unordered list) -msgid "" -"[pandoc][pandoc] and Perl for generating the documentation HTML and website." -msgstr "" -"[pandoc][pandoc] et Perl pour générer le HTML de la documentation e de le " -"site web." - #: README.en.md:block 25 (paragraph) msgid "" "Send contributions to the [mailing list][mailing list] via [`git send-" @@ -386,6 +379,16 @@ msgid "" msgstr "" "[`git-permalink.1`][`git-permalink.1`] ([en][en2], [pt][pt2], [eo][eo2])." +msgid "[pandoc][pandoc] for generating the documentation HTML and website." +msgstr "" +"[pandoc][pandoc] pour générer le HTML de la documentation e de le site web." + +#~ msgid "" +#~ "[pandoc][pandoc] and Perl for generating the documentation HTML and website." +#~ msgstr "" +#~ "[pandoc][pandoc] et Perl pour générer le HTML de la documentation e de le " +#~ "site web." + #~ msgid "" #~ "The documentation is available via installed manpages or online: [`git-" #~ "permalink.1`][`git-permalink.1`] ([pt][pt2], [fr][fr2], [eo][eo2])." diff --git a/po/LC_MESSAGES/README.en.md/pt.po b/po/LC_MESSAGES/README.en.md/pt.po index ffb14f4..b721f13 100644 --- a/po/LC_MESSAGES/README.en.md/pt.po +++ b/po/LC_MESSAGES/README.en.md/pt.po @@ -113,11 +113,6 @@ msgstr "" "[po4a][po4a], [mdpo][mdpo] e [gettext][gettext] para suporte à " "internacionalização e localização;" -#: README.en.md:block 20 (unordered list) -msgid "" -"[pandoc][pandoc] and Perl for generating the documentation HTML and website." -msgstr "[pandoc][pandoc] e Perl para gerar o HTML da documentação e do site." - #: README.en.md:block 25 (paragraph) msgid "" "Send contributions to the [mailing list][mailing list] via [`git send-" @@ -382,7 +377,14 @@ msgstr "" msgid "" "[`git-permalink.1`][`git-permalink.1`] ([pt][pt2], [fr][fr2], [eo][eo2])." msgstr "" -" [`git-permalink.1`][`git-permalink.1`] ([en][en2], [fr][fr2], [eo][eo2])." +"[`git-permalink.1`][`git-permalink.1`] ([en][en2], [fr][fr2], [eo][eo2])." + +msgid "[pandoc][pandoc] for generating the documentation HTML and website." +msgstr "[pandoc][pandoc] para gerar o HTML da documentação e do site." + +#~ msgid "" +#~ "[pandoc][pandoc] and Perl for generating the documentation HTML and website." +#~ msgstr "[pandoc][pandoc] e Perl para gerar o HTML da documentação e do site." #~ msgid "" #~ "The documentation is available via installed manpages or online: [`git-" |