From 3a6f77a1ef5a9b379432462560e6ec69bd46284f Mon Sep 17 00:00:00 2001
From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com>
Date: Thu, 6 May 2021 11:48:56 +0200
Subject: [PATCH 1/5] Added examples.
---
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README.md b/README.md
index 1b2dcbf..44f73cc 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,15 @@ Example: `--ignore-vcs-ignored`
## Examples
+- [tests/docs/hooks.md](tests/docs/hooks.md)
+- [tests/docs/hookster-actions.json](tests/docs/hookster-actions.json)
+- [tests/docs/hookster-filters.json](tests/docs/hookster-filters.json)
+- https://github.com/wp-pay-gateways/omnikassa-2/blob/2.3.2/docs/hooks.md
+- https://github.com/wp-pay-gateways/adyen/blob/1.3.1/docs/hooks.md
+- https://github.com/wp-pay-gateways/mollie/blob/2.2.3/docs/hooks.md
+- https://github.com/wp-pay-extensions/gravityforms/blob/2.6.0/docs/hooks.md
+- https://github.com/wp-pay/core/blob/2.7.0/docs/hooks.md
+
```
vendor/bin/wp-documentor parse ./tests/source
```
From 8cad343060f6cc7463bfc637fbae115231be1cab Mon Sep 17 00:00:00 2001
From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com>
Date: Thu, 6 May 2021 11:51:01 +0200
Subject: [PATCH 2/5] Update README.md
---
README.md | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 44f73cc..1ea4389 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,8 @@
## Table of contents
- [Getting Started](#getting-started)
-- [Examples](#examples)
+- [Command Line Usage](#command-line-usage)
+- [Output Examples](#output-examples)
- [Alternatives](#alternatives)
- [Links](#links)
@@ -91,16 +92,7 @@ If the search directory contains a `.gitignore` file, you can reuse those rules
Example: `--ignore-vcs-ignored`
-## Examples
-
-- [tests/docs/hooks.md](tests/docs/hooks.md)
-- [tests/docs/hookster-actions.json](tests/docs/hookster-actions.json)
-- [tests/docs/hookster-filters.json](tests/docs/hookster-filters.json)
-- https://github.com/wp-pay-gateways/omnikassa-2/blob/2.3.2/docs/hooks.md
-- https://github.com/wp-pay-gateways/adyen/blob/1.3.1/docs/hooks.md
-- https://github.com/wp-pay-gateways/mollie/blob/2.2.3/docs/hooks.md
-- https://github.com/wp-pay-extensions/gravityforms/blob/2.6.0/docs/hooks.md
-- https://github.com/wp-pay/core/blob/2.7.0/docs/hooks.md
+### Examples
```
vendor/bin/wp-documentor parse ./tests/source
@@ -120,6 +112,18 @@ vendor/bin/wp-documentor parse ./tests/source --format=phpdocumentor-rst --type=
vendor/bin/wp-documentor parse ./tests/source --format=phpdocumentor-rst --type=filters --output=tests/docs/phpdocumentor-filters.rst
```
+## Ouput Examples
+
+- [tests/docs/hooks.md](tests/docs/hooks.md)
+- [tests/docs/hookster-actions.json](tests/docs/hookster-actions.json)
+- [tests/docs/hookster-filters.json](tests/docs/hookster-filters.json)
+- https://github.com/wp-pay-gateways/omnikassa-2/blob/2.3.2/docs/hooks.md
+- https://github.com/wp-pay-gateways/adyen/blob/1.3.1/docs/hooks.md
+- https://github.com/wp-pay-gateways/mollie/blob/2.2.3/docs/hooks.md
+- https://github.com/wp-pay-extensions/gravityforms/blob/2.6.0/docs/hooks.md
+- https://github.com/wp-pay/core/blob/2.7.0/docs/hooks.md
+
+
## Alternatives
Here is a list of alternatives that we found. However, none of these satisfied our requirements.
From 7029181e5deab90191d7624d63870e4d4ff78352 Mon Sep 17 00:00:00 2001
From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com>
Date: Thu, 6 May 2021 11:55:25 +0200
Subject: [PATCH 3/5] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 1ea4389..264a2fc 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,7 @@
- [Getting Started](#getting-started)
- [Command Line Usage](#command-line-usage)
+ - [Examples](#examples)
- [Output Examples](#output-examples)
- [Alternatives](#alternatives)
- [Links](#links)
From 685b7edd71781321f8b41eb86e28a3a1129bc9da Mon Sep 17 00:00:00 2001
From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com>
Date: Thu, 10 Jun 2021 13:08:15 +0200
Subject: [PATCH 4/5] Show file being processed in progress bar.
---
CHANGELOG.md | 7 ++++++-
bin/wp-documentor | 13 +++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c3a4b67..7fee7c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [1.1.1] 2021-06-10
+### Changed
+- Progress bar now shows the file being processed.
+
## [1.1.0] - 2014-04-16
### Added
- Added `--exclude` option.
@@ -19,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- First Release.
-[Unreleased]: https://github.com/pronamic/wp-documentor/compare/1.1.0...HEAD
+[Unreleased]: https://github.com/pronamic/wp-documentor/compare/1.1.1...HEAD
+[1.1.1]: https://github.com/pronamic/wp-documentor/releases/tag/1.2.0
[1.1.0]: https://github.com/pronamic/wp-documentor/releases/tag/1.1.0
[1.0.0]: https://github.com/pronamic/wp-documentor/releases/tag/1.0.0
diff --git a/bin/wp-documentor b/bin/wp-documentor
index 78db416..8d32786 100755
--- a/bin/wp-documentor
+++ b/bin/wp-documentor
@@ -105,9 +105,15 @@ $application->register( 'parse' )
/**
* Progress Bar.
+ *
+ * @link https://symfony.com/doc/current/components/console/helpers/progressbar.html
*/
$progress_bar = new ProgressBar( $output, \iterator_count( $finder ) );
+ ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
+
+ $progress_bar->setFormat( 'custom' );
+
/**
* Documentor.
*/
@@ -133,12 +139,19 @@ $application->register( 'parse' )
/**
* Parse.
*/
+ $progress_bar->setMessage( 'Start' );
+ $progress_bar->start();
+
foreach ( $finder as $file ) {
+ $progress_bar->setMessage( 'Processing fileā¦' );
+ $progress_bar->setMessage( $file->getPathname(), 'filename' );
+
$documentor->parse( $file );
$progress_bar->advance();
}
+ $progress_bar->setMessage( 'Done' );
$progress_bar->finish();
/**
From 83f5dab970dc20f8325599f5001e796e9bf68fe9 Mon Sep 17 00:00:00 2001
From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com>
Date: Thu, 10 Jun 2021 13:09:28 +0200
Subject: [PATCH 5/5] Version to 1.1.1.
---
bin/wp-documentor | 2 +-
templates/markdown.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/wp-documentor b/bin/wp-documentor
index 8d32786..a69c489 100755
--- a/bin/wp-documentor
+++ b/bin/wp-documentor
@@ -35,7 +35,7 @@ use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Finder\Finder;
-$application = new Application( 'Pronamic WordPress Documentor', '1.1.0' );
+$application = new Application( 'Pronamic WordPress Documentor', '1.1.1' );
$application->register( 'parse' )
->addArgument( 'source', InputArgument::REQUIRED, 'Directory to scan for hooks extraction.' )
diff --git a/templates/markdown.php b/templates/markdown.php
index 43edd4d..255b665 100644
--- a/templates/markdown.php
+++ b/templates/markdown.php
@@ -70,7 +70,7 @@
printf(
'Generated by Pronamic WordPress Documentor %s
',
'https://github.com/pronamic/wp-documentor',
- '1.1.0'
+ '1.1.1'
);
echo '
';