Skip to content

Commit

Permalink
v0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzy-ax committed May 5, 2018
1 parent b5bb455 commit bcb7ba8
Show file tree
Hide file tree
Showing 19 changed files with 552 additions and 695 deletions.
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
mazzy@mazzy.ru, 2017-11-06, [https://github.com/mazzy-ax/Write-ProgressEx](https://github.com/mazzy-ax/Write-ProgressEx)

# Changelog

All notable changes to this project will be documented in this file.
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.18](https://github.com/mazzy-ax/Write-ProgressEx/compare/v0.17...v0.18) - 2018-05-06

* The function `Set-ProgressEx` fixed.
* The example `Write-ProgressEx.autoName.ps1` fixed.
* The cmdlet `Set-StrictMode` removed from project scripts.
* The directive `#require -version 3.0` removed from project scripts.
* The function `nz` extracted from `Write-ProgressExMessage`.
* The `chocolateyInstall.ps1` removed.
* The directory structure reorganized to remove media, examples and tests from nuget downloads and powershell gallery.
* The project meta info tests added.
* Tests fixed.
* Readme changed.
* Typo corrected.

## [v0.17](https://github.com/mazzy-ax/Write-ProgressEx/compare/v0.16...v0.17) - 2017-11-06

* The main goal is a code housekeeping and refactoring
* The internal function Write-ProgressExStd removed. It was not exported function.
* It has refactoring of Cmdlets
* Set-ProgressEx show standard progress bar as is. This cmdlet does not make a changing of parameters.
* Write-Progress maintains parameters and switches. It calculates RemainSeconds, PercendComplete, increment Current value, passthrow InputValue. It call Set-ProgressEx to show standard progress bar and messages.
* Write-Progress maintains parameters and switches. It calculates RemainSeconds, PercentComplete, increment Current value, passthru InputValue. It call Set-ProgressEx to show standard progress bar and messages.

## [v0.16](https://github.com/mazzy-ax/Write-ProgressEx/compare/v0.15...v0.16) - 2017-10-27

Expand Down
2 changes: 0 additions & 2 deletions Examples/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mazzy@mazzy.ru, 2017-10-21, [https://github.com/mazzy-ax/Write-ProgressEx](https://github.com/mazzy-ax/Write-ProgressEx)

# Examples

## [Write-ProgressEx.pipe.ps1](Write-ProgressEx.pipe.ps1)
Expand Down
16 changes: 0 additions & 16 deletions Examples/Write-ProgressEx.Exapmles.Tests.ps1

This file was deleted.

13 changes: 3 additions & 10 deletions Examples/Write-ProgressEx.autoName.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# mazzy@mazzy.ru, 2017-10-21
# https://github.com/mazzy-ax/write-progressEx
$range = 1..500

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$PSCommandPath | Split-Path -Parent | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force


1..500 | write-ProgressEx | ForEach-Object {
$range | write-ProgressEx -Total $range.Count | ForEach-Object {
# The progress name is equal to the script file name
}

function test-range {
1..500 | write-ProgressEx | ForEach-Object {
$range | write-ProgressEx -Total $range.Count | ForEach-Object {
# The progress name is equal to the function name
}
}
Expand Down
11 changes: 2 additions & 9 deletions Examples/Write-ProgressEx.counter.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# mazzy@mazzy.ru, 2017-10-22
# https://github.com/mazzy-ax/write-progressEx
$projectRoot = Resolve-Path $PSScriptRoot\..

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$path = $PSCommandPath | Split-Path -Parent
$path | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force

$path | Join-Path -ChildPath Write-ProgressEx.*.ps1 | Get-ChildItem | write-ProgressEx -id 0 "files in Exapmle directory" -ShowMessagesOnCompleted -NoProgressBar | 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)"}
Expand Down
9 changes: 0 additions & 9 deletions Examples/Write-ProgressEx.info.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# mazzy@mazzy.ru, 2017-10-21
# https://github.com/mazzy-ax/write-progressEx

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$PSCommandPath | Split-Path -Parent | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force


$range = 1..1000

write-ProgressEx 'wait, please' -Total $range.Count
Expand Down
9 changes: 0 additions & 9 deletions Examples/Write-ProgressEx.multi.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# mazzy@mazzy.ru, 2017-10-21
# https://github.com/mazzy-ax/write-progressEx

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$PSCommandPath | Split-Path -Parent | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force


$level1 = 1..6
$level2 = 1..9
$level3 = 1..11
Expand Down
9 changes: 0 additions & 9 deletions Examples/Write-ProgressEx.parm.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# mazzy@mazzy.ru, 2017-10-21
# https://github.com/mazzy-ax/write-progressEx

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$PSCommandPath | Split-Path -Parent | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force


$nodes = 1..20
$names = 1..50

Expand Down
9 changes: 0 additions & 9 deletions Examples/Write-ProgressEx.pipe.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# mazzy@mazzy.ru, 2017-10-21
# https://github.com/mazzy-ax/write-progressEx

#requires -version 3.0

$module = "Write-ProgressEx.psd1"
$PSCommandPath | Split-Path -Parent | Split-Path -Parent | Join-Path -ChildPath $module | Import-Module -Force


$nodes = 1..20
$names = 1..50

Expand Down
48 changes: 30 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
mazzy@mazzy.ru, 2017-11-06, [https://github.com/mazzy-ax/Write-ProgressEx](https://github.com/mazzy-ax/Write-ProgressEx)

![version](https://img.shields.io/badge/version-0.17-green.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg) [![Powershell Gallery](https://img.shields.io/badge/Powershell-Gallery-blue.svg)](https://www.powershellgallery.com/packages/write-ProgressEx)
# Write-ProgressEx: extended write-progress cmdlet

---
[project]:https://github.com/mazzy-ax/Write-ProgressEx
[version.svg]:https://img.shields.io/badge/version-0.18-green.svg
[license]:https://github.com/mazzy-ax/Write-ProgressEx/blob/master/LICENSE
[license.svg]:https://img.shields.io/badge/license-MIT-blue.svg
[ps]:https://www.powershellgallery.com/packages/Write-ProgressEx
[ps.svg]:https://img.shields.io/powershellgallery/dt/Write-ProgressEx.svg?colorB=4682B4
[nuget]:https://www.nuget.org/packages/Write-ProgressEx
[nuget.svg]:https://img.shields.io/nuget/dt/Write-ProgressEx.svg?label=NuGet&colorB=ef8b00

# Write-ProgressEx: extended write-progress cmdlet
[![version][version.svg]][project] [![license MIT][license.svg]][license] [![PowerShell Gallery][ps.svg]][ps] [![NuGet][nuget.svg]][nuget]

**Write-ProgressEx** extend the functionality of the standard powershell cmdlet. Write-ProgressEx is a powershell native cmdlet that provide a simple way to show ProgressBars, PercentComplete and SecondsRemaining.
[Write-ProgressEx][project] extends the functionality of the standard powershell cmdlet. Write-ProgressEx is a powershell native cmdlet that provide a simple way to show ProgressBars, PercentComplete and SecondsRemaining.

![icon](/Media/Write-ProgressEx-icon.png "Write-ProgressEx")
![icon](Media/Write-ProgressEx-icon.png "Write-ProgressEx")

The cmdlet:

* works with pipe;
* works with empty activity string;
* uses [system.diagnostic.stopwatch] to calculate remaning seconds and dispaly a total elapsed time;
* uses [system.diagnostic.stopwatch] to calculate remaining seconds and display a total elapsed time;
* completes all inner progresses if no parameters;
* automatically completes with pipe;
* automatically calculates percents;
Expand All @@ -33,7 +38,7 @@ The cmdlet:

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

# Examples
## Examples

A pipe and a simple loop:

Expand Down Expand Up @@ -71,16 +76,16 @@ $outer | Write-ProgressEx "pipe nodes" -Status "outer" -Total $outer.Count -Show

More samples are in the folder [Examples](Examples).

# Installation
## Installation

Automatic install Write-ProgressEx module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/write-ProgressEx):
Automatic install Write-ProgressEx module from the [PowerShell Gallery][ps]:

```powershell
Install-Module -Name Write-ProgressEx
Import-Module Write-ProgressEx
```

Automatic install Write-ProgressEx module from the [NuGet.org](https://www.nuget.org/packages/Write-ProgressEx):
Automatic install Write-ProgressEx module from the [NuGet.org][nuget]:

```powershell
Install-Package -Name Write-ProgressEx
Expand All @@ -90,11 +95,18 @@ Import-Module Write-ProgressEx
or manual:

* Download and unblock the latest .zip file.
* Extract the .zip into your $PSModulePath, e.g. ~\Documents\WindowsPowerShell\Modules.
* Ensure the extracted folder is named 'Write-ProgressEx'.
* Set an execution policy to RemoteSigned or Unrestricted to execute not signed modules 'Set-ExecutionPolicy RemoteSigned'.
* Run 'Import-Module Write-ProgressEx'.
* Extract the .zip into your `$PSModulePath`, e.g. `~\Documents\WindowsPowerShell\Modules`.
* Ensure the extracted folder is named `Write-ProgressEx`.
* Set an execution policy to `RemoteSigned` or `Unrestricted` to execute not signed modules `Set-ExecutionPolicy RemoteSigned`.
* Run `Import-Module Write-ProgressEx`.

## Changelog

* [CHANGELOG.md](CHANGELOG.md)
* <https://github.com/mazzy-ax/Write-ProgressEx/releases>.

## License

# Changelog
This project is [licensed under the MIT License][license].

See file [CHANGELOG.md](CHANGELOG.md).
mazzy@mazzy.ru
Loading

0 comments on commit bcb7ba8

Please sign in to comment.