diff --git a/docs/Usage/Configuration-settings.md b/docs/Usage/Configuration-settings.md index 5e88b8be9..02c148026 100644 --- a/docs/Usage/Configuration-settings.md +++ b/docs/Usage/Configuration-settings.md @@ -1,5 +1,5 @@ # Configuration settings - + ## version QR Code version number diff --git a/docs/Usage/Overview.md b/docs/Usage/Overview.md index 15f47b31f..a3cf856e7 100644 --- a/docs/Usage/Overview.md +++ b/docs/Usage/Overview.md @@ -31,9 +31,9 @@ It also features a QR Code reader based on a [PHP port](https://github.com/khana - PHP 7.4+ - [`ext-mbstring`](https://www.php.net/manual/book.mbstring.php) - optional: - - [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output) - [`ext-gd`](https://www.php.net/manual/book.image) - [`ext-imagick`](https://github.com/Imagick/imagick) with [ImageMagick](https://imagemagick.org) installed + - [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output) - [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module For the QR Code reader, either `ext-gd` or `ext-imagick` is required! @@ -54,6 +54,7 @@ For the QR Code reader, either `ext-gd` or `ext-imagick` is required! - [floating-share-button](https://github.com/qriouslad/floating-share-button) - WoltLab Suite - [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/) + - [[Developer] PHP QR Code](https://www.woltlab.com/pluginstore/file/7995-entwickler-php-qr-code/) - other uses: - [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE) - [Appwrite](https://github.com/appwrite/appwrite) diff --git a/docs/index.rst b/docs/index.rst index 99784fbc8..d7e1285a7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,9 @@ .. php-qrcode documentation master file, created by sphinx-quickstart on Sun Jul 9 21:45:56 2023. markdown-rst converter: https://pandoc.org/try/ -================= -PHP-QRCode Manual -================= +============================ +chillerlan PHP-QRCode Manual +============================ User manual for `chillerlan/php-qrcode `__ [|version|]. Updated on |today|. diff --git a/docs/qroptions-doc.php b/docs/qroptions-doc.php index fb0c5f200..989322158 100644 --- a/docs/qroptions-doc.php +++ b/docs/qroptions-doc.php @@ -35,7 +35,8 @@ array_shift($lines); array_pop($lines); - $see = []; + $see = []; + $link = []; foreach($lines as $line){ @@ -50,7 +51,14 @@ // collect links for "see also" if(str_starts_with($line, '@see')){ - $see[] = $line; + $see[] = substr($line, 5); // cut off the "@see " + + continue; + } + + // collect links for "links" + if(str_starts_with($line, '@link')){ + $link[] = substr($line, 6); // cut off the "@link " continue; } @@ -63,7 +71,6 @@ $content[] = "\n**See also:**\n"; foreach($see as $line){ - $line = substr($line, 5); // cut off the "@see " // normal links if(str_starts_with($line, 'http')){ @@ -88,6 +95,28 @@ } + // add "Links" section + if(!empty($link)){ + $content[] = "\n**Links:**\n"; + + foreach($link as $line){ + + // skip non-url + if(!str_starts_with($line, 'http')){ + continue; + } + + $url = explode(' ', $line, 2); + + $content[] = match(count($url)){ + 1 => sprintf('- [%s](%s)', explode('://', $url[0])[1], $url[0]), + 2 => sprintf('- [%s](%s)', trim($url[1]), $url[0]), + }; + + } + + } + $content[] = "\n"; }