Skip to content

Commit bbb2414

Browse files
committed
📖
1 parent a54c1a5 commit bbb2414

File tree

4 files changed

+38
-8
lines changed

4 files changed

+38
-8
lines changed

Diff for: docs/Usage/Configuration-settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration settings
2-
<!-- This file is auto generated from the source of QROptionsTrait.php -->
2+
<!-- This file is auto generated from the source of QROptions.php -->
33
## version
44

55
QR Code version number

Diff for: docs/Usage/Overview.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ It also features a QR Code reader based on a [PHP port](https://github.com/khana
3131
- PHP 7.4+
3232
- [`ext-mbstring`](https://www.php.net/manual/book.mbstring.php)
3333
- optional:
34-
- [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output)
3534
- [`ext-gd`](https://www.php.net/manual/book.image)
3635
- [`ext-imagick`](https://github.com/Imagick/imagick) with [ImageMagick](https://imagemagick.org) installed
36+
- [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output)
3737
- [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module
3838

3939
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!
5454
- [floating-share-button](https://github.com/qriouslad/floating-share-button)
5555
- WoltLab Suite
5656
- [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/)
57+
- [[Developer] PHP QR Code](https://www.woltlab.com/pluginstore/file/7995-entwickler-php-qr-code/)
5758
- other uses:
5859
- [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE)
5960
- [Appwrite](https://github.com/appwrite/appwrite)

Diff for: docs/index.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. php-qrcode documentation master file, created by sphinx-quickstart on Sun Jul 9 21:45:56 2023.
22
markdown-rst converter: https://pandoc.org/try/
33
4-
=================
5-
PHP-QRCode Manual
6-
=================
4+
============================
5+
chillerlan PHP-QRCode Manual
6+
============================
77

88
User manual for `chillerlan/php-qrcode <https://github.com/chillerlan/php-qrcode/>`__ [|version|]. Updated on |today|.
99

Diff for: docs/qroptions-doc.php

+32-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
array_shift($lines);
3636
array_pop($lines);
3737

38-
$see = [];
38+
$see = [];
39+
$link = [];
3940

4041
foreach($lines as $line){
4142

@@ -50,7 +51,14 @@
5051

5152
// collect links for "see also"
5253
if(str_starts_with($line, '@see')){
53-
$see[] = $line;
54+
$see[] = substr($line, 5); // cut off the "@see "
55+
56+
continue;
57+
}
58+
59+
// collect links for "links"
60+
if(str_starts_with($line, '@link')){
61+
$link[] = substr($line, 6); // cut off the "@link "
5462

5563
continue;
5664
}
@@ -63,7 +71,6 @@
6371
$content[] = "\n**See also:**\n";
6472

6573
foreach($see as $line){
66-
$line = substr($line, 5); // cut off the "@see "
6774

6875
// normal links
6976
if(str_starts_with($line, 'http')){
@@ -88,6 +95,28 @@
8895

8996
}
9097

98+
// add "Links" section
99+
if(!empty($link)){
100+
$content[] = "\n**Links:**\n";
101+
102+
foreach($link as $line){
103+
104+
// skip non-url
105+
if(!str_starts_with($line, 'http')){
106+
continue;
107+
}
108+
109+
$url = explode(' ', $line, 2);
110+
111+
$content[] = match(count($url)){
112+
1 => sprintf('- [%s](%s)', explode('://', $url[0])[1], $url[0]),
113+
2 => sprintf('- [%s](%s)', trim($url[1]), $url[0]),
114+
};
115+
116+
}
117+
118+
}
119+
91120
$content[] = "\n";
92121
}
93122

0 commit comments

Comments
 (0)