Skip to content

Commit

Permalink
v0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzy-ax committed May 13, 2018
1 parent 3641944 commit 3000f74
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 88 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Changelog

All notable changes to the [project](https://github.com/mazzy-ax/Write-ProgressEx) will be documented in this file. See also <https://github.com/mazzy-ax/Write-ProgressEx/releases>.
All notable changes to the [project](https://github.com/mazzy-ax/Write-ProgressEx) will be documented in this file.
See also <https://github.com/mazzy-ax/Write-ProgressEx/releases>.

## [v0.20](https://github.com/mazzy-ax/Write-ProgressEx/compare/v0.19...v0.20) - 2018-05-13

* [System.Diagnostics.Stopwatch]$Stopwatch replaced on [DateTime]$StartDateTime and [TimeSpan]$Elapsed
* parameters removed:
* `NoProgressBar`
* parameters added:
* `ShowProgressBar` with `Auto`, `Force` and `None` values
* `StartDateTime`
* `ProgressDateTime`
* `Elapsed`
* `UpdateDateTime`
* `UpdateInterval`
* fixed due changed parameters:
* Get-ProgressEx, Set-ProgressEx, Write-ProgressEx cmdlets
* examples
* messages
* reamde and comments updated

## [v0.19](https://github.com/mazzy-ax/Write-ProgressEx/compare/v0.18...v0.19) - 2018-05-06

Expand Down
11 changes: 5 additions & 6 deletions Examples/Write-ProgressEx.counter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
#
# see https://github.com/mazzy-ax/Write-ProgressEx for details

$projectRoot = Resolve-Path $PSScriptRoot\..
Get-ChildItem $PSScriptRoot\Write-ProgressEx.*.ps1 |
write-ProgressEx -id 0 "files in Exapmle directory" -ShowMessagesOnFirstIteration -ShowMessagesOnCompleted -ShowProgress None |
ForEach-Object {

$projectRoot | Join-Path -ChildPath Write-ProgressEx.*.ps1 | Get-ChildItem | write-ProgressEx -id 0 "files in Exapmle directory" -ShowMessagesOnCompleted -NoProgressBar | ForEach-Object {
# ....
If ( $_.Name -notmatch '\.Tests\.ps1' ) {
Write-ProgressEx "Examples" -Increment -id 1 -ParentId -1 -NoProgressBar -MessageOnCompleted {param([hashtable]$pInfo) Write-Warning "$($pInfo.Activity): $($pInfo.Current)"}
}

}
Write-ProgressEx -id 1 -Completed

8 changes: 7 additions & 1 deletion Examples/Write-ProgressEx.info.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

$range = 1..1000

write-ProgressEx 'wait, please' -Total $range.Count
Write-Verbose @'
-ShowProgress Force causes to show the progress bar in each iteration. It takes a long time.
Default value for -ShowProgress parameter is Auto. It redraws the progress bar no more than once every 100 milliseconds.
You can use -ShowProgress None to disable the progress bar display.
'@

write-ProgressEx 'wait, please' -Total $range.Count -ShowProgress Force
$range | write-ProgressEx | ForEach-Object {
$pInfo = Get-ProgressEx

Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[ps]:https://www.powershellgallery.com/packages/Write-ProgressEx
[nuget]:https://www.nuget.org/packages/Write-ProgressEx

[version.svg]:https://img.shields.io/badge/version-0.19-green.svg
[version.svg]:https://img.shields.io/badge/version-0.20-green.svg
[license.svg]:https://img.shields.io/badge/license-MIT-blue.svg
[ps.svg]:https://img.shields.io/badge/Powershell-Gallery-4682B4.svg
[nuget.svg]:https://img.shields.io/badge/downloads-NuGet-orange.svg
Expand Down Expand Up @@ -34,8 +34,9 @@ The cmdlet:
* status changed;
* completed.
* uses script blocks to show messages;
* provides counter functional. See [Write-ProgressEx as a counter](Examples/Write-ProgressEx.counter.ps1);
* uses the caller function name or the caller script file name as the Activity.
* provides a counter functional. See [Write-ProgressEx as a counter](Examples/Write-ProgressEx.counter.ps1);
* uses the caller function name or the caller script file name as the Activity;
* accepts `-ShowProgressBar Auto` parameter to reduce the overhead for redrawing a screen. It recognizes `None` and `Force` values also.

Note 1: the cmdlet is not safe with multi-thread.

Expand Down Expand Up @@ -71,6 +72,13 @@ $outer | Write-ProgressEx "pipe nodes" -Status "outer" -Total $outer.Count -Show
}
```

A long time command:

```powershell
$files = Get-ChildItem $env:homepath -recurse | Write-ProgressEx -Activity $env:homepath
```


![screenshot: Write-ProgressEx](Media/examples.pipe.png)

![screenshot: Result messages](Media/examples.messages.png)
Expand Down
16 changes: 7 additions & 9 deletions Write-ProgressEx.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Write-ProgressEx</id>
<version>0.19</version>
<version>0.20</version>
<authors>Sergey Mazurkin</authors>
<licenseUrl>https://github.com/mazzy-ax/Write-ProgressEx/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/mazzy-ax/Write-ProgressEx</projectUrl>
<iconUrl>https://github.com/mazzy-ax/Write-ProgressEx/blob/master/Media/Write-ProgressEx-icon.png?raw=true</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Write-ProgressEx extends the functionality of the standard cmdlet. Write-ProgressEx is a powershell native cmdlet that provide a simple way to show ProgressBars, PercentComplete and SecondsRemaining.</description>
<releaseNotes>
## v0.19
## v0.20

* The switch Reset added to Write-ProgressEx cmdlet.
* Deep refactoring in the cmdlet Set-ProgressEx.
* 'On completed message' clarified.
* The directive '#require -module Write-ProgressEx' added to example scripts.
* Splatting example added.
* Examples and tests cleanup.
* Readme changed.
* [System.Diagnostics.Stopwatch]$Stopwatch replaced on [DateTime]$StartDateTime and [TimeSpan]$Elapsed
* parameters added: paShowProgressBar, StartDateTime, ProgressDateTime, Elapsed, UpdateDateTime, UpdateInterval
* parameter removed: NoProgressBar
* fixed due changed parameters: cmdlets Get-ProgressEx, Set-ProgressEx, Write-ProgressEx cmdlets, examples and messages
* reamde and comments updated
</releaseNotes>
<tags>Progress ProgressBar Write-Progress</tags>
</metadata>
Expand Down
18 changes: 8 additions & 10 deletions Write-ProgressEx/Write-ProgressEx.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'Write-ProgressEx.psm1'

# Version number of this module.
ModuleVersion = '0.19'
ModuleVersion = '0.20'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -100,15 +100,13 @@ PrivateData = @{

# ReleaseNotes of this module
ReleaseNotes = @'
## v0.19
* The switch Reset added to Write-ProgressEx cmdlet.
* Deep refactoring in the cmdlet Set-ProgressEx.
* 'On completed message' clarified.
* The directive '#require -module Write-ProgressEx' added to example scripts.
* Splatting example added.
* Examples and tests cleanup.
* Readme changed.
## v0.20
* [System.Diagnostics.Stopwatch]$Stopwatch replaced on [DateTime]$StartDateTime and [TimeSpan]$Elapsed
* parameters added: paShowProgressBar, StartDateTime, ProgressDateTime, Elapsed, UpdateDateTime, UpdateInterval
* parameter removed: NoProgressBar
* fixed due changed parameters: cmdlets Get-ProgressEx, Set-ProgressEx, Write-ProgressEx cmdlets, examples and messages
* reamde and comments updated
'@

# External dependent modules of this module
Expand Down
Loading

0 comments on commit 3000f74

Please sign in to comment.