Releases: Mpdreamz/shellprogressbar
5.2.0
https://www.nuget.org/packages/ShellProgressBar/5.2.0
What's Changed
- Added new Option
PercentageFormat
by @jonilviv in #84 - Add Chinese Support by @Teastears in #82
- Option to add child as indeterminate progress bar by @diegosps in #98
- Adds option to configure the Foreground Done Color by @gfs in #97
- Fix #94, #89 Estimated duration "overflow" if > 24h, Tick doesn't update estimatedDuration by @drehtisch in #95
- move to net6 for example project by @Mpdreamz in #100
New Contributors
- @jonilviv made their first contribution in #84
- @Teastears made their first contribution in #82
- @diegosps made their first contribution in #98
- @gfs made their first contribution in #97
- @drehtisch made their first contribution in #95
Full Changelog: 5.1.0...5.2.0
5.1.0
- Provide SPDX license identifier for packages (#68) ty @mburtscher
- Add documentation on how to use pbar.AsProgress() in the README (#70) ty @0xced!
- Make ShellProgressBar.Progress implement the IDisposable interface (#73) ty @0xced!
- Add .NET Framework 4.6.1 target (#72) ty @erickmcarvalho !
- Fixed children not drawing other children (#75) ty @bozhidar
Persist message to StdErr
Since 5.0.0
you can call WriteLine
on ProgressBar
to write persistant message above the running progressbar that persist after completion. This release adds WriteErrorLine
to write to standard error. See #59
Condensed Progress bars
By Setting Condensed = true
you can now create single line progressbars! See #77 for more.
condensed.mp4
Indeterminate Progress bars!
@peter-shinydocs added a way to create indeterminate progress bars through the aptly named IndeterminateProgressBar
. Thanks for such a cool feature @peter-shinydocs !
5.0.0
The progress bar will now scroll children into view as much as it can see:
Bump to 5.0.0
because this release changes a typo on IProgressBar
. ForeGroundColor
is now Foregroundcolor
and accepts a setter as well allowing you to update the color of the progressbars at runtime
Further more you can now call Tick()
with an estimated total run time which will be displayed on the running time
Full list of changes here:
Massive thanks to everyone involved: @chris579 @DanielHartl @KrisztianKaszas and everyone reporting issues
4.3.0
https://www.nuget.org/packages/ShellProgressBar/4.3.0
- Change interface Tick() signature to match implementation (#33) ty @kjaleshire !
- If output is redirected, disables progress bar and allows only taskbar progress display.(#44) Thank you @hakakou
- Add AsProgress method on IProgressBar (#39) …
This allows seamless integration with existing methods taking an IProgress for progress reporting. ty - Fix wraparound if progress runs for more than 24hrs (#40) ty @gakera
- New feature relates to #31 allow messages to be written above the console (#49)
4.2.0
Added FixedDurationBar
which is great for visualizing tasks with a fixed duration whereas ProgressBar
works best for tasks with an unknown duration.
protected override void Start()
{
var options = new ProgressBarOptions
{
ForegroundColor = ConsoleColor.Yellow,
ForegroundColorDone = ConsoleColor.DarkGreen,
BackgroundColor = ConsoleColor.DarkGray,
BackgroundCharacter = '\u2593'
};
var wait = TimeSpan.FromSeconds(25);
using (var pbar = new FixedDurationBar(wait, "", options))
{
var t = new Thread(()=> LongRunningTask(pbar));
t.Start();
if (!pbar.CompletedHandle.WaitOne(wait))
Console.Error.WriteLine($"{nameof(FixedDurationBar)} did not signal {nameof(FixedDurationBar.CompletedHandle)} after {wait}");
}
}
private static void LongRunningTask(FixedDurationBar bar)
{
for (var i = 0; i < 1_000_000; i++)
{
bar.Message = $"{i} events";
if (bar.IsCompleted) break;
Thread.Sleep(1);
}
}
4.1.1
https://www.nuget.org/packages/ShellProgressBar/4.1.1
- On windows, we now support taskbar progress indication #15
It's off by default, you have to set ProgressBarOptions.EnableTaskBarProgress to true. Thank you @thoemmi!! - Docs now show off
ProgressBarOptions
as per #17 thank you @jstallm 👍 - Setting a new max tick count during progressing had a bug in the drawing routine #20 thank you @dhilgarth 👍
- #15 introduced a typeload exception on non windows platforms thank you @dlech for fixing this in #26
- High tick count performance was not ideal due to the frequent
lock
access's @dlech fixed this in #27 - Another performance fix from @dlech in #28: The use of Console.CursorTop and Console.CursorLeft is very expensive on .NET Core 2.1 on Linux see also: https://github.com/dotnet/corefx/issues/31517. Many many thanks for these PR's @dlech 👍 😸