Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Sep 5, 2024
1 parent 5a610cc commit ad7a4d6
Show file tree
Hide file tree
Showing 24 changed files with 630 additions and 279 deletions.
177 changes: 20 additions & 157 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,176 +1,39 @@
# Changelog for PSTimers

## v2.1.0
## [Unreleased]

### Change

- General code cleanup

### Fixed

- Fixed default path reference in `Start-PSCountDown`.
- Fixed about_pstimers help topic.

## v2.0.1

### Changed

- Added missing online help links for new functions.
- Updated external help.
Updated `README.md`.

## v2.0.0
## [2.2.0] - 2024-09-05

### Changed

- Merged [PR#12](https://github.com/jdhitsolutions/PSTimers/pull/12) from @joshua-russell to update `Set-MyTimer`. His change was refined further.
- Revised how PSBoundParameters are displayed in Verbose output.
- Updates to the `PSCountdownTasks.txt` file.
- Added `-PassThru` parameter to `Stop-MyTimer` to return the timer object. The default now is to not write anything to the pipeline. **This is a breaking change**.
- Moved the import-related constructor code from the `MyTimer` class to `Import-MyTimer`. **This is a breaking change**.
- Revised `Remove-MyTimer` to remove the associated stopwatch object from `$MyWatchCollection`.
- Modified `Export-MyTimer` to export multiple timers to the same file
- Updated auto completers to wrap timer names with spaces in single quotes.
- Modified `mytimer.format.ps1xml` to highlight `MyTask` names using ANSI depending on the task status.
- Modified `mytimer.format.ps1xml` to format duration value without milliseconds.
- Modified `Get-MyTimer` to support getting timers based on status. [Issue #14](https://github.com/jdhitsolutions/PSTimers/issues/14)
- Help updates.
- Updated `README.md`.
- Moved module to version `2.0.0` due to the number of breaking changes and addition of many commands.

### Added

- Rewrote the `MyTimer` class to allow for pausing, resuming, and restarting. The class keeps an associated `[System.Diagnostics.StopWatch]` object in a separate hash table, `$MyWatchCollection`. **This is a potential breaking change**.
- Added function `Suspend-MyTimer` with an alias of `Pause-MyTimer`, and functions `Resume-MyTimer`,`Reset-MyTimer`, and `Restart-MyTimer`. [Issue #13](https://github.com/jdhitsolutions/PSTimers/issues/13)
- Updated `README`.
- Updated code in `Start-PSCountdownTimer`.
- Updated countdown tasks.

### Fixed

- Fixed bug in `Set-MyTimer` to update the relevant hash table entries.

## v1.1.0

### Added

- Restored missing class definition for `MyTask`.

### Fixed
- Fixed broken online help links.

- Revised `Start-MyTimer` and `Get-MyTimer` to fix error with invalid output type. [Issue #11](https://github.com/jdhitsolutions/PSTimers/issues/11)
## [v2.1.0] - 2023-07-10

### Changed

- Modified `mytimer.format.ps1xml` to use auto sizing.
- Revised `Start-MyTimer` to display a warning if a timer with the same name has already been created.
- Updated help documentation.
- Update `README.md

## v1.0.1

- Added missing online help links.
- Help updates
- reorganized module layout.
- Modified `Start-PSCountdownTimer` to let the user specify the alert and warning time intervals and corresponding color.

## v1.0.0

- Merged [Pull Request #7](https://github.com/jdhitsolutions/PSTimers/pull/7) and [Pull Request #8](https://github.com/jdhitsolutions/PSTimers/pull/8). Thank you @joshua-russell
- Added online help links.
- Updated PSCountdown tasks.
- Reorganized module layout.
- Changed `-ProgressStyle` parameter in `Start-PSCountdown` from a dynamic parameter to a standard parameter since the original blocker on non-Windows platforms has been resolved.
- Updated `Start-PSCountdown` to use `$PSStyle` settings if detected. [Issue #10](https://github.com/jdhitsolutions/PSTimers/issues/10)
- Added `Start-PSCountdownTimer`. [Issue #1](https://github.com/jdhitsolutions/PSTimers/issues/1)
- Added `Stop-PSCountdownTimer`.
- Updated help.
- Updated `README.md`.

## v0.9.0

- Removed -All parameter from `Get-MyTimer` (Issue #6). **This is a breaking change**.
- Updated warning messages in `Get-MyTimer` (Issue #5)
- help updates

## v0.8.0

- Added property set called `History` for MyTimer object to display End value (Issue #4)
- Updated `MyTimer.format.ps1xml` to include `End` value
- Modified `Stop-MyTimer` to write result to pipeline. Removed `-PassThru` (Issue #3)
- Modified MyTimer class to not hide `End` property.
- Modified `Get-MyTimer` to take pipeline input for Name by property name
- help and documentation updates

## v0.7.1

- fixed bug with `-ProgressStyle` parameter on `Start-PSCountdown`
- added additional tasks to `PScountdowntask.txt`
- added an alias of `cls` for the `-ClearHost` parameter on `Start-PSCountdown`
- Minor help updates

## v0.7.0

- fixed bug piping a MyTimer to `Stop-MyTimer` (Issue #2)
- Added `-PassThru` parameter to `Stop-MyTimer`
- Made `-Name` parameter mandatory for `Stop-MyTimer`
- MyTimer names must be unique
- Updated about_MyTimer help documentation
- Added auto completers for MyTimer commands
- added additional entries to `PSCountdowntasks.txt`
- Renamed `-GlobalBlock` parameter in `Start-PSTimer` to `-Scriptblock` but kept original name as a parameter alias.

## v0.6.1

- file cleanup for the PowerShell Gallery
- updated license
- added additional entries to `PSCountdowntasks.txt`

## v0.6.0

- Added alias definitions to functions
- Updated manifest
- Updated help
- Renamed about help topic
- Updated README

## v0.5.1

- Added format type extension for MyTimer

## v0.5.0

- Added Description property to MyTimer
- Added `Set-MyTimer` to modify a timer object
- Added -PassThru to `Set-MyTimer`
- Modified `Get-MyTimer` to default to only running timers
- Added -All parameter to Get-MyTimer
- Updated `Import-MyTimer` to support description
- Fixed bug in `Start-MyTimer` creating multiple timers
- Updated help

## v0.4.0

- corrected markdown in about_MyTimer
- moved functions to separate file
- converted MyTimer functions to using a class-based object
- Added Get-HistoryRuntime command

## v0.3.0
- General code cleanup

- Added MyTimer commands
- Created markdown help
- Created external help
### Fixed

## v0.2.0
- Fixed default path reference in `Start-PSCountDown`.
- Fixed `about_PSTimers` help topic.

- Modified `Start-PSCountdown` take a datetime as a countdown target
- Modified `Start-PSTimer` to include title in text countdown
- Updated manifest
## [v2.0.1] - 2023-06-29

## v0.1.0
### Changed

- initial files and functions## [Unreleased]
- General code cleanup
- Fixed default path reference in `Start-PSCountDown`.
- Fixed default path reference in `Start-PSCountDown`.
- Added missing online help links for new functions.
- Updated external help.
Updated `README.md`.

### Fixed
- Fixed about_pstimers help topic.
[Unreleased]: https://github.com/jdhitsolutions/PSTimers/compare/v2.2.0..HEAD
[2.2.0]: https://github.com/jdhitsolutions/PSTimers/compare/v2.1.0..v2.2.0
[v2.1.0]: https://github.com/jdhitsolutions/pstimers/compare/v2.0.1..v2.1.0
[v2.0.1]: https://github.com/jdhitsolutions/pstimers/compare/v2.0.0..v2.0.1
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2023 JDH Information Technology Solutions, Inc.
Copyright (c) 2017-2024 JDH Information Technology Solutions, Inc.


Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
32 changes: 19 additions & 13 deletions PSCountdownTasks.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#This is a list of entries for Start-PSCountdown
#enter each entry on its own line.
#enter each entry on a separate line.
#Comment out items with the # symbol.
Mining some cryptocurrency
Waiting for someone to press enter
Waiting for someone to press Enter
Warming up processors
Downloading Twitter
Downloading Facebook
Learning Kubernetes
Reading Ulysses by James Joyce
Waiting for my Tesla to charge
Expand All @@ -13,47 +12,50 @@ Commencing infinite loop
Injecting double negatives
Studying for the latest Azure certification exam
Deleting temp files
Learning Python
Updating my resume
Waiting for the cable guy
Watching for the next Marvel portal to open
Breeding bits
Learning git
Capturing escaped bits
Dreaming of electric sheep
Calculating gravitational constant
Adding Hidden Agendas
Adjusting Bell Curves
Calculating the gravitational constant
Adding hidden agendas
Adjusting bell curves
Learning Python
Aligning Covariance Matrices
Attempting to Lock Back-Buffer
Deleting Active Directory
Building Data Trees
Calculating Inverse Probability Matrices
Calculating Llama Expectoration Trajectory
Compounding Inert Tessellations
Building a better mousetrap
Concatenating Sub-Contractors
Containing Existential Buffer
Deciding What Message to Display Next
Increasing Accuracy of RCI Simulators
Perturbing Matrices
Playing Dungeons & Dragons
Initializing flux capacitors
Brushing up on my Dothraki
Preparing second breakfast
Preparing the jump to lightspeed
Preparing the jump to light-speed
Initiating self-destruct sequence
Mining cryptocurrency
Aligning Heisenberg compensators
Setting phasers to stun
Deciding...blue pill or yellow?
Bringing Skynet online
Bringing SkyNet online
Learning PowerShell
Contacting the upside down
Pre-famulating amulite base plates
Pre-formulating amulite base plates
On hold with Comcast customer service
Calculating pi
Doing the Time Warp
Waiting for Godot
Folding proteins
Installing the newest AZ PowerShell modules
Installing the newest Azure PowerShell modules
Searching for infinity stones
Restarting the ARC reactor
Learning regular expressions
Expand Down Expand Up @@ -82,20 +84,24 @@ Searching for the Golden Fleece
Destroying the last horcrux
Operating novertrunnions
Waiting for flying cars and personal jet packs
Quitting Facebook
Translating War and Peace into Japanese
Backing up and clearing event logs
Reducing sinusoidal repleneration
Deleting Active Directory
Setting up a Sharepoint farm. Don't ask.
Making plans to attend the next PowerShell Summit
Hunting the Jabberwocky
Writing Pester tests for my module
Installing a 3-node SQL Server failover cluster
Buying a copy of the PowerShell Practice Primer
Detecting local IP addresses and adding to botnet
Updating PowerShell modules
Installing the latest version of PowerShell
Upgrading to the latest version of VS Code
Reticulating Splines
Finishing my application to Star Fleet Academy
Recalculating
Searching for Grogu's family
Inverting reactive current
Synchronizing cardinal grammeters
Preventing side fumbling
Expand Down
Binary file modified PSTimers.psd1
Binary file not shown.
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ PS C:\> ghr 295 -Detail
This module incorporates commands from a previous module that creates simple timer objects.

* [Start-MyTimer](docs/Start-MyTimer.md)
* [Get-MyTimer](docs/Get-MyTimer.md)
* [Stop-MyTimer](docs/Stop-MyTimer.md)
* [Suspend-MyTimer](docs/Suspend-MyTimer.md)
* [Resume-MyTimer](docs/Resume-MyTimer.md)
* [Reset-MyTimer](docs/Reset-MyTimer.md)
* [Set-MyTimer](docs/Set-MyTimer.md)
* [Restart-MyTimer](docs/Restart-MyTimer.md)
* [Remove-MyTimer](docs/Remove-MyTimer.md)
* [Import-MyTimer](docs/Import-MyTimer.md)
* [Export-MyTimer](docs/Export-MyTimer.md)
- [Start-MyTimer](docs/Start-MyTimer.md)
- [Get-MyTimer](docs/Get-MyTimer.md)
- [Stop-MyTimer](docs/Stop-MyTimer.md)
- [Suspend-MyTimer](docs/Suspend-MyTimer.md)
- [Resume-MyTimer](docs/Resume-MyTimer.md)
- [Reset-MyTimer](docs/Reset-MyTimer.md)
- [Set-MyTimer](docs/Set-MyTimer.md)
- [Restart-MyTimer](docs/Restart-MyTimer.md)
- [Remove-MyTimer](docs/Remove-MyTimer.md)
- [Import-MyTimer](docs/Import-MyTimer.md)
- [Export-MyTimer](docs/Export-MyTimer.md)

The `MyTimer` object is defined in a private PowerShell class.

Expand Down Expand Up @@ -171,7 +171,19 @@ Set it to `Minimal` to restore.

Use `Ctrl+C` to terminate a countdown.

## :alarm_clock: PSCountdownTimer
## :computer: Start-PSTimer

For a more traditional countdown timer, you can use [Start-PSTimer](docs/Start-PSTimer.md). This is an ideal command when you have a simple countdown, say, from 10. You can invoke a script block at the countdown completion.

```powershell
PS C:\> Start-PSTimer -ScriptBlock {Get-Date} -Message "Let's Do This Thing!" -Title "Get-Ready"
```

## WPF-Based Timers

If you are running a Windows-platform, you can use a WPF-based countdown timer.

### :alarm_clock: PSCountdownTimer

An alternative to `Start-PSCountdown` is [Start-PSCountdownTimer](docs/Start-PSCountdownTimer.md) and related [Stop-PSCountdownTimer](docs/Stop-PSCountdownTimer.md)

Expand Down Expand Up @@ -236,14 +248,6 @@ $global:MediaPlayer.Play()
# $MediaPlayer.close()
```

## :computer: Start-PSTimer

For a more traditional countdown timer, you can use [Start-PSTimer](docs/Start-PSTimer.md). This is an ideal command when you have a simple countdown, say, from 10. You can invoke a script block at the countdown completion.

```powershell
PS C:\> Start-PSTimer -Scriptblock {Get-Date} -Message "Let's Do This Thing!" -Title "Get-Ready"
```

## :hammer: Related Tools

For a related project, take a look at the [PSClock](https://github.com/jdhitsolutions/PSClock) module. Or if you need a simple to-do manager, look at the [PSWorkItem](https://github.com/jdhitsolutions/PSWorkItem) module.
Loading

0 comments on commit ad7a4d6

Please sign in to comment.