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/README.md b/README.md index 1b2dcbf..264a2fc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ ## Table of contents - [Getting Started](#getting-started) -- [Examples](#examples) +- [Command Line Usage](#command-line-usage) + - [Examples](#examples) +- [Output Examples](#output-examples) - [Alternatives](#alternatives) - [Links](#links) @@ -91,7 +93,7 @@ If the search directory contains a `.gitignore` file, you can reuse those rules Example: `--ignore-vcs-ignored` -## Examples +### Examples ``` vendor/bin/wp-documentor parse ./tests/source @@ -111,6 +113,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. diff --git a/bin/wp-documentor b/bin/wp-documentor index 78db416..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.' ) @@ -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(); /** 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 '

';