From 5b57abc7d845d31317dd5d51e6445d1745435465 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 5 Sep 2023 19:37:38 +0800 Subject: [PATCH] GHA CI: add checking for doc And also regenerate man pages with latest pandoc --- .github/workflows/ci_file_health.yaml | 19 +++++++++++++++++++ doc/en/qbittorrent-nox.1 | 14 ++++---------- doc/en/qbittorrent.1 | 14 ++++---------- doc/ru/qbittorrent-nox.1 | 5 +++-- doc/ru/qbittorrent.1 | 5 +++-- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci_file_health.yaml b/.github/workflows/ci_file_health.yaml index eb151513c..a28913a03 100644 --- a/.github/workflows/ci_file_health.yaml +++ b/.github/workflows/ci_file_health.yaml @@ -23,3 +23,22 @@ jobs: - name: Check files uses: pre-commit/action@v3.0.0 + + - name: Check doc + env: + pandoc_path: "${{ github.workspace }}/../pandoc" + run: | + # install pandoc + curl \ + -L \ + -o "${{ runner.temp }}/pandoc.tar.gz" \ + "https://github.com/jgm/pandoc/releases/download/3.1.7/pandoc-3.1.7-linux-amd64.tar.gz" + tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.." + mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}" + # run pandoc + for lang in doc/*/; do + "${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent.1.md" -o "$lang/qbittorrent.1" + "${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent-nox.1.md" -o "$lang/qbittorrent-nox.1" + done + # check diff, ignore "Automatically generated by ..." part + git diff -I '\.\\".*' --exit-code diff --git a/doc/en/qbittorrent-nox.1 b/doc/en/qbittorrent-nox.1 index 7398fad50..7d1ee0dd1 100644 --- a/doc/en/qbittorrent-nox.1 +++ b/doc/en/qbittorrent-nox.1 @@ -1,20 +1,16 @@ -.\" Automatically generated by Pandoc 2.9.2 +.\" Automatically generated by Pandoc 3.1.7 .\" .TH "QBITTORRENT-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt" "" -.hy .SH NAME -.PP qBittorrent-nox - a command line Bittorrent client written in C++ / Qt .SH SYNOPSIS -.PP \f[B]qbittorrent-nox\f[R] -\f[C][--d|--daemon] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] +\f[CR][--d|--daemon] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] .PP -\f[B]qbittorrent-nox\f[R] \f[C]--help\f[R] +\f[B]qbittorrent-nox\f[R] \f[CR]--help\f[R] .PP -\f[B]qbittorrent-nox\f[R] \f[C]--version\f[R] +\f[B]qbittorrent-nox\f[R] \f[CR]--version\f[R] .SH DESCRIPTION -.PP \f[B]qBittorrent-nox\f[R] is an advanced command-line Bittorrent client written in C++ / Qt using the \f[B]libtorrent-rasterbar\f[R] library by Arvid Norberg. @@ -32,7 +28,6 @@ which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account user name is \[lq]admin\[rq] with \[lq]adminadmin\[rq] as a password. .SH OPTIONS -.PP \f[B]\f[CB]--help\f[B]\f[R] Prints the command line options. .PP \f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version @@ -41,7 +36,6 @@ number. \f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default: 8080). .SH BUGS -.PP If you find a bug, please report it at https://bugs.qbittorrent.org .SH AUTHORS Christophe Dumez . diff --git a/doc/en/qbittorrent.1 b/doc/en/qbittorrent.1 index 1f683376c..4efca9e0d 100644 --- a/doc/en/qbittorrent.1 +++ b/doc/en/qbittorrent.1 @@ -1,20 +1,16 @@ -.\" Automatically generated by Pandoc 2.9.2 +.\" Automatically generated by Pandoc 3.1.7 .\" .TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt" "" -.hy .SH NAME -.PP qBittorrent - a Bittorrent client written in C++ / Qt .SH SYNOPSIS -.PP \f[B]qbittorrent\f[R] -\f[C][--no-splash] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] +\f[CR][--no-splash] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] .PP -\f[B]qbittorrent\f[R] \f[C]--help\f[R] +\f[B]qbittorrent\f[R] \f[CR]--help\f[R] .PP -\f[B]qbittorrent\f[R] \f[C]--version\f[R] +\f[B]qbittorrent\f[R] \f[CR]--version\f[R] .SH DESCRIPTION -.PP \f[B]qBittorrent\f[R] is an advanced Bittorrent client written in C++ / Qt, using the \f[B]libtorrent-rasterbar\f[R] library by Arvid Norberg. qBittorrent is similar to uTorrent. @@ -24,7 +20,6 @@ It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible), FAST extension (mainline) and PeX support (utorrent compatible). .SH OPTIONS -.PP \f[B]\f[CB]--help\f[B]\f[R] Prints the command line options. .PP \f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version @@ -35,7 +30,6 @@ number. \f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default: 8080). .SH BUGS -.PP If you find a bug, please report it at https://bugs.qbittorrent.org .SH AUTHORS Christophe Dumez . diff --git a/doc/ru/qbittorrent-nox.1 b/doc/ru/qbittorrent-nox.1 index 7eccb73c5..ba8713bae 100644 --- a/doc/ru/qbittorrent-nox.1 +++ b/doc/ru/qbittorrent-nox.1 @@ -1,6 +1,7 @@ +.\" Automatically generated by Pandoc 3.1.7 +.\" .TH "QBITTORRENT-NOX" "1" "16 января 2010" "Клиент сети БитТоррент для командной строки" "" .SH НАЗВАНИЕ -.PP qBittorrent-nox \[em] клиент сети БитТоррент для командной строки. .SH АВТОРЫ -Christophe Dumez +Christophe Dumez . diff --git a/doc/ru/qbittorrent.1 b/doc/ru/qbittorrent.1 index 413595ac8..2fc395ddd 100644 --- a/doc/ru/qbittorrent.1 +++ b/doc/ru/qbittorrent.1 @@ -1,6 +1,7 @@ +.\" Automatically generated by Pandoc 3.1.7 +.\" .TH "QBITTORRENT" "1" "16 января 2010" "Клиент сети БитТоррент" "" .SH НАЗВАНИЕ -.PP qBittorrent \[em] клиент сети БитТоррент. .SH АВТОРЫ -Christophe Dumez +Christophe Dumez .