Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jun 10, 2021
2 parents 2f8b2ec + 83f5dab commit 886d98c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down
15 changes: 14 additions & 1 deletion bin/wp-documentor
Original file line number Diff line number Diff line change
Expand Up @@ -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.' )
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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();

/**
Expand Down
2 changes: 1 addition & 1 deletion templates/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
printf(
'<em>Generated by <a href="%s">Pronamic WordPress Documentor</a> <code>%s</code></em>',
'https://github.com/pronamic/wp-documentor',
'1.1.0'
'1.1.1'
);

echo '<p>';
Expand Down

0 comments on commit 886d98c

Please sign in to comment.