From 6cc9f967288e3e37d5c4cefa9016276ebe055c83 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 11:13:19 -0400 Subject: [PATCH 01/13] Prototype manual page --- README.md | 5 ++- RoboFile.php | 13 +++++++ dist/arch/PKGBUILD | 3 +- dist/arch/PKGBUILD-git | 4 +- .../999_The_Command-Line_Manual_Page.md | 37 +++++++++++++++++++ 5 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md diff --git a/README.md b/README.md index 74831aa..ad8cdc2 100644 --- a/README.md +++ b/README.md @@ -110,10 +110,11 @@ The manual employs a custom theme derived from the standard Daux theme. If the s Producing a release package is done by running `./robo package`. This performs the following operations: - Duplicates a working tree with the commit (usually a release tag) to package -- Generates the manual +- Generates UNIX manual pages with [Pandoc](https://pandoc.org/) +- Generates the HTML manual - Installs runtime Composer dependencies with an optimized autoloader - Deletes numerous unneeded files - Exports the default configuration of The Arsse to a file - Compresses the remaining files into a tarball -Due to the first step, [Git](https://git-scm.com/) is required to package a release. +Due to the first two steps, [Git](https://git-scm.com/) and [Pandoc](https://pandoc.org/) are required in PATH to package a release. diff --git a/RoboFile.php b/RoboFile.php index 8c107fe..cd2c7a9 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -171,6 +171,8 @@ class RoboFile extends \Robo\Tasks { // get useable version strings from Git $version = trim(`git -C "$dir" describe --tags`); $archVersion = preg_replace('/^([^-]+)-(\d+)-(\w+)$/', "$1.r$2.$3", $version); + // generate manpages + $t->addTask($this->taskExec("./robo manpage")->dir($dir)); // name the generic release tarball $tarball = "arsse-$version.tar.gz"; // generate the Debian changelog; this also validates our original changelog @@ -324,6 +326,17 @@ class RoboFile extends \Robo\Tasks { return $t->run(); } + /** Generates the "arsse" command's manual page (UNIX man page) + * + * This requires that the Pandoc document converter be installed and + * available in $PATH. + */ + public function manpage(): Result { + $src = BASE."docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md"; + $out = BASE."dist/manpage"; + return $this->taskExec("pandoc -s -f markdown -t man -o ".escapeshellarg($out)." ".escapeshellarg($src))->run(); + } + protected function changelogParse(string $text, string $targetVersion): array { $lines = preg_split('/\r?\n/', $text); $version = ""; diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index 48a6dc3..a264a3e 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -32,7 +32,7 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "etc/php/php-fpm.d/" "etc/webapps/arsse" "etc/webapps/arsse/nginx" + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1", "etc/php/php-fpm.d" "etc/webapps/arsse" #copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" @@ -42,6 +42,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" + cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions diff --git a/dist/arch/PKGBUILD-git b/dist/arch/PKGBUILD-git index 4249f0a..fb25a49 100644 --- a/dist/arch/PKGBUILD-git +++ b/dist/arch/PKGBUILD-git @@ -37,6 +37,7 @@ pkgver() { build() { cd "$srcdir/arsse" composer install + ./robo manpage ./robo manual composer install --no-dev -o --no-scripts php arsse.php conf save-defaults config.defaults.php @@ -48,7 +49,7 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "etc/php/php-fpm.d/" "etc/webapps/arsse" "etc/webapps/arsse/nginx" + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1", "etc/php/php-fpm.d" "etc/webapps/arsse" #copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" @@ -58,6 +59,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" + cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions diff --git a/docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md b/docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md new file mode 100644 index 0000000..454c28d --- /dev/null +++ b/docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md @@ -0,0 +1,37 @@ +% ARSSE(1) arsse 0.9.2 +% J. King +% 2021-05-28 + +# NAME + +arsse - manage an instance of The Advanced RSS Environment (The Arsse) + +# SYNOPSIS + +**arsse** <*command*> [<*args*>]\ +**arsse** --version\ +**arsse** -h|--help + +# DESCRIPTION + +**arsse** allows a sufficiently privileged user to perform various administrative operations related to The Arsse, including: + +- Adding and removing users +- Managing passwords and authentication tokens +- Importing and exporting OPML newsfeed-lists + +These are documented in the next section **PRIMARY COMMANDS**. Further, seldom-used commands are documented in the following section **ADDITIONAL COMMANDS**. + +# PRIMARY COMMANDS + +## Managing users + +**arsse user [list]** + +: Displays a simple list of user names with one entry per line + +**arsse user add** <*username*> [<*password*>] [--admin] + +: Adds a new user to the database with the specified username and password. If <*password*> is omitted a random password will be generated and printed. + +: The **--admin** flag may be used to mark the user as an administrator. This has no meaning within the context of The Arsse as a whole, but it is used for access control in the Miniflux and Nextcloud News protocols. \ No newline at end of file From e439dd82778c468491a665a364f4a18714119bef Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 12:26:51 -0400 Subject: [PATCH 02/13] Fix manpage in Arch PKGBUILD --- RoboFile.php | 6 +++--- dist/arch/PKGBUILD | 2 +- dist/arch/PKGBUILD-git | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index cd2c7a9..4e1cdb5 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -171,8 +171,6 @@ class RoboFile extends \Robo\Tasks { // get useable version strings from Git $version = trim(`git -C "$dir" describe --tags`); $archVersion = preg_replace('/^([^-]+)-(\d+)-(\w+)$/', "$1.r$2.$3", $version); - // generate manpages - $t->addTask($this->taskExec("./robo manpage")->dir($dir)); // name the generic release tarball $tarball = "arsse-$version.tar.gz"; // generate the Debian changelog; this also validates our original changelog @@ -187,7 +185,9 @@ class RoboFile extends \Robo\Tasks { $t->addTask($this->taskReplaceInFile($dir."dist/arch/PKGBUILD")->regex('/^source=\("arsse-[^"]+"\)$/m')->to('source=("'.basename($tarball).'")')); // perform Composer installation in the temp location with dev dependencies $t->addTask($this->taskComposerInstall()->arg("-q")->dir($dir)); - // generate the manual + // generate manpages + $t->addTask($this->taskExec("./robo manpage")->dir($dir)); + // generate the HTML manual $t->addTask($this->taskExec("./robo manual -q")->dir($dir)); // perform Composer installation in the temp location for final output $t->addTask($this->taskComposerInstall()->dir($dir)->noDev()->optimizeAutoloader()->arg("--no-scripts")->arg("-q")); diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index a264a3e..ad4b671 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -42,7 +42,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp -T dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions diff --git a/dist/arch/PKGBUILD-git b/dist/arch/PKGBUILD-git index fb25a49..104a299 100644 --- a/dist/arch/PKGBUILD-git +++ b/dist/arch/PKGBUILD-git @@ -59,7 +59,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp -T dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions From 176aac0ad79604cd2fae9fe509e768f48165f0f5 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 12:37:32 -0400 Subject: [PATCH 03/13] Fix stupid typo properly --- dist/arch/PKGBUILD | 4 ++-- dist/arch/PKGBUILD-git | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index ad4b671..7d4d7d4 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -32,7 +32,7 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1", "etc/php/php-fpm.d" "etc/webapps/arsse" + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1" "etc/php/php-fpm.d" "etc/webapps/arsse" #copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" @@ -42,7 +42,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp -T dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions diff --git a/dist/arch/PKGBUILD-git b/dist/arch/PKGBUILD-git index 104a299..41bae53 100644 --- a/dist/arch/PKGBUILD-git +++ b/dist/arch/PKGBUILD-git @@ -49,7 +49,7 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1", "etc/php/php-fpm.d" "etc/webapps/arsse" + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1" "etc/php/php-fpm.d" "etc/webapps/arsse" #copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" @@ -59,7 +59,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp -T dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions From d3a983e7f0e9f3b8f7af08fd24393c95c4bba0ad Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 14:05:30 -0400 Subject: [PATCH 04/13] Move the markdown manpage Daux uses Cmmonmark, which does not support indention, required for proper formatting of manual pages. Consequently, the manul page will instead be standalone. --- RoboFile.php | 2 +- .../999_The_Command-Line_Manual_Page.md => manpage.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/{en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md => manpage.md} (100%) diff --git a/RoboFile.php b/RoboFile.php index 4e1cdb5..acd9397 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -332,7 +332,7 @@ class RoboFile extends \Robo\Tasks { * available in $PATH. */ public function manpage(): Result { - $src = BASE."docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md"; + $src = BASE."docs/manpage.md"; $out = BASE."dist/manpage"; return $this->taskExec("pandoc -s -f markdown -t man -o ".escapeshellarg($out)." ".escapeshellarg($src))->run(); } diff --git a/docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md b/docs/manpage.md similarity index 100% rename from docs/en/025_Using_The_Arsse/999_The_Command-Line_Manual_Page.md rename to docs/manpage.md From 2ec7acc50b33d61a0b8a30682099bc30bb8cbb1d Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 14:13:45 -0400 Subject: [PATCH 05/13] Turn off "smart" character substitution in Pandoc --- RoboFile.php | 2 +- docs/manpage.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index acd9397..1049f23 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -334,7 +334,7 @@ class RoboFile extends \Robo\Tasks { public function manpage(): Result { $src = BASE."docs/manpage.md"; $out = BASE."dist/manpage"; - return $this->taskExec("pandoc -s -f markdown -t man -o ".escapeshellarg($out)." ".escapeshellarg($src))->run(); + return $this->taskExec("pandoc -s -f markdown-smart -t man -o ".escapeshellarg($out)." ".escapeshellarg($src))->run(); } protected function changelogParse(string $text, string $targetVersion): array { diff --git a/docs/manpage.md b/docs/manpage.md index 454c28d..d2e116d 100644 --- a/docs/manpage.md +++ b/docs/manpage.md @@ -34,4 +34,8 @@ These are documented in the next section **PRIMARY COMMANDS**. Further, seldom-u : Adds a new user to the database with the specified username and password. If <*password*> is omitted a random password will be generated and printed. -: The **--admin** flag may be used to mark the user as an administrator. This has no meaning within the context of The Arsse as a whole, but it is used for access control in the Miniflux and Nextcloud News protocols. \ No newline at end of file + The **--admin** flag may be used to mark the user as an administrator. This has no meaning within the context of The Arsse as a whole, but it is used control access to certain features in the Miniflux and Nextcloud News protocols. + +**arsse user remove** <*username*> + +: Immediately removes a user from the database. All associated data (folders, subscriptions, etc.) are also removed. From 3e55ab3849d6a5c4d3067238944763c673d09205 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 15:44:51 -0400 Subject: [PATCH 06/13] Move man pages to their own directory --- .gitignore | 1 + RoboFile.php | 12 +++++++++--- docs/manpage.md => manpages/en.md | 0 3 files changed, 10 insertions(+), 3 deletions(-) rename docs/manpage.md => manpages/en.md (100%) diff --git a/.gitignore b/.gitignore index b488382..f81d4dc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /dist/arch/arsse/ /dist/arch/src/ /dist/arch/pkg/ +/dist/man/ /arsse.db* /config.php /.php_cs.cache diff --git a/RoboFile.php b/RoboFile.php index 1049f23..964164a 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -204,6 +204,7 @@ class RoboFile extends \Robo\Tasks { $dir."RoboFile.php", $dir."CONTRIBUTING.md", $dir."docs", + $dir."manpages", $dir."tests", $dir."vendor-bin", $dir."vendor/bin", @@ -332,9 +333,14 @@ class RoboFile extends \Robo\Tasks { * available in $PATH. */ public function manpage(): Result { - $src = BASE."docs/manpage.md"; - $out = BASE."dist/manpage"; - return $this->taskExec("pandoc -s -f markdown-smart -t man -o ".escapeshellarg($out)." ".escapeshellarg($src))->run(); + $p = $this->taskParallelExec(); + $man = [ + 'en' => "man1/arsse.1", + ]; + foreach($man as $src => $out) { + $p->process("pandoc -s -f markdown-smart -t man -o ".escapeshellarg(BASE."dist/$out")." ".escapeshellarg(BASE."manpages/$src.md")); + } + return $p->run(); } protected function changelogParse(string $text, string $targetVersion): array { diff --git a/docs/manpage.md b/manpages/en.md similarity index 100% rename from docs/manpage.md rename to manpages/en.md From 92823d5bc27a681367dcb77545cb33f237770953 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 16:19:52 -0400 Subject: [PATCH 07/13] Create directories before executing Pandoc --- RoboFile.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RoboFile.php b/RoboFile.php index 964164a..5140624 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -333,14 +333,19 @@ class RoboFile extends \Robo\Tasks { * available in $PATH. */ public function manpage(): Result { + $t = $this->collectionBuilder(); $p = $this->taskParallelExec(); $man = [ 'en' => "man1/arsse.1", ]; foreach($man as $src => $out) { - $p->process("pandoc -s -f markdown-smart -t man -o ".escapeshellarg(BASE."dist/$out")." ".escapeshellarg(BASE."manpages/$src.md")); + $src = BASE."manpages/$src.md"; + $out = BASE."dist/man/$out"; + $t->addTask($this->taskFilesystemStack()->mkdir(dirname($out), 0755)); + $p->process("pandoc -s -f markdown-smart -t man -o ".escapeshellarg($out)." ".escapeshellarg($src)); } - return $p->run(); + $t->addTask($p); + return $t->run(); } protected function changelogParse(string $text, string $targetVersion): array { From 46c88f584f4ea1443c68b612a58a197a63a7af6b Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 16:29:53 -0400 Subject: [PATCH 08/13] Fix copying of man page in PKGBUILDs --- dist/arch/PKGBUILD | 6 +++--- dist/arch/PKGBUILD-git | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index 7d4d7d4..872f06b 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -32,8 +32,8 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1" "etc/php/php-fpm.d" "etc/webapps/arsse" - #copy requisite files + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "etc/php/php-fpm.d" "etc/webapps/arsse" + # copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" cp -r manual/* "$pkgdir/usr/share/doc/arsse" @@ -42,7 +42,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp -r dist/man "$pkgdir/usr/share" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions diff --git a/dist/arch/PKGBUILD-git b/dist/arch/PKGBUILD-git index 41bae53..1de2bfd 100644 --- a/dist/arch/PKGBUILD-git +++ b/dist/arch/PKGBUILD-git @@ -49,8 +49,8 @@ package() { depends=("php>=7.1" "php-intl>=7.1" "php-sqlite>=7.1" "php-fpm>=7.1") # create most directories necessary for the final package cd "$pkgdir" - mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "usr/share/man/man1" "etc/php/php-fpm.d" "etc/webapps/arsse" - #copy requisite files + mkdir -p "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "usr/lib/tmpfiles.d" "etc/php/php-fpm.d" "etc/webapps/arsse" + # copy requisite files cd "$srcdir/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" cp -r manual/* "$pkgdir/usr/share/doc/arsse" @@ -59,7 +59,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp dist/manpage "$pkgdir/usr/share/man/man1/arsse.1" + cp -r dist/man "$pkgdir/usr/share" cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # copy files requiring special permissions From 88487d27a20ab47da3bad697ad7c22dc4ad47e77 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 17:40:20 -0400 Subject: [PATCH 09/13] Expand manual page --- manpages/en.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/manpages/en.md b/manpages/en.md index d2e116d..15ab304 100644 --- a/manpages/en.md +++ b/manpages/en.md @@ -16,7 +16,7 @@ arsse - manage an instance of The Advanced RSS Environment (The Arsse) **arsse** allows a sufficiently privileged user to perform various administrative operations related to The Arsse, including: -- Adding and removing users +- Adding and removing users and managing their metadata - Managing passwords and authentication tokens - Importing and exporting OPML newsfeed-lists @@ -24,7 +24,7 @@ These are documented in the next section **PRIMARY COMMANDS**. Further, seldom-u # PRIMARY COMMANDS -## Managing users +## Managing users and metadata **arsse user [list]** @@ -34,8 +34,28 @@ These are documented in the next section **PRIMARY COMMANDS**. Further, seldom-u : Adds a new user to the database with the specified username and password. If <*password*> is omitted a random password will be generated and printed. - The **--admin** flag may be used to mark the user as an administrator. This has no meaning within the context of The Arsse as a whole, but it is used control access to certain features in the Miniflux and Nextcloud News protocols. +: The **--admin** flag may be used to mark the user as an administrator. This has no meaning within the context of The Arsse as a whole, but it is used control access to certain features in the Miniflux and Nextcloud News protocols. **arsse user remove** <*username*> : Immediately removes a user from the database. All associated data (folders, subscriptions, etc.) are also removed. + +**arsse user show** <*username*> + +: Displays a table of metadata properties and their assigned values for <*username*>. These properties are primarily used by the Miniflux protocol. Consult the section **USER METADATA** for details. + +**arsse user set** <*username*> <*property*> <*value*> + +: Sets a metadata property for a user. These properties are primarily used by the Miniflux protocol. Consult the section **USER METADATA** for details. + +**arsse user unset** <*username*> <*property*> + +: Clears a metadata property for a user. The property is thereafter set to its default value, which is protocol-dependent. + +## Managing passwords and authentication tokens + +**arsse user set-pass** <*username*> [<*password*>] [--fever] + +: Changes a user's password to the specified value. If no password is specified, a random password will be generated and printed. +\ +: The **--fever** option sets a user's Fever protocol password instead of their general password. As Fever requires that passwords be stored insecurely, users do not have Fever passwords by default, and logging in to the Fever protocol is disabled until a password is set. It is highly recommended that a user's Fever password be different from their general password. From 62d49e0d3cfe89c5aaa9af699593e85c48b3fb73 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 29 May 2021 21:48:02 -0400 Subject: [PATCH 10/13] Fill out most of the manual page Removed most of the online help as a consequence since maintaining both is frought --- lib/CLI.php | 211 +++---------------------------------------------- manpages/en.md | 165 +++++++++++++++++++++++++++++++++----- 2 files changed, 158 insertions(+), 218 deletions(-) diff --git a/lib/CLI.php b/lib/CLI.php index f892bdd..c867b3c 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -13,223 +13,34 @@ use JKingWeb\Arsse\REST\Miniflux\Token as Miniflux; class CLI { public const USAGE = << - arsse.php conf save-defaults [] arsse.php user [list] arsse.php user add [] [--admin] arsse.php user remove arsse.php user show arsse.php user set arsse.php user unset - arsse.php user set-pass [] - [--oldpass=] [--fever] - arsse.php user unset-pass - [--oldpass=] [--fever] + arsse.php user set-pass [] [--fever] + arsse.php user unset-pass [--fever] arsse.php user auth [--fever] arsse.php token list arsse.php token create [