diff --git a/License.txt b/License.txt index 5b06281..50ca55f 100644 --- a/License.txt +++ b/License.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2024 JDH Information Technology Solutions, Inc. +Copyright (c) 2022-2025 JDH Information Technology Solutions, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/PSProjectStatus-Help.pdf b/PSProjectStatus-Help.pdf new file mode 100644 index 0000000..dcf4874 Binary files /dev/null and b/PSProjectStatus-Help.pdf differ diff --git a/PSProjectStatus.psd1 b/PSProjectStatus.psd1 index 3546093..342d60d 100644 --- a/PSProjectStatus.psd1 +++ b/PSProjectStatus.psd1 @@ -2,12 +2,12 @@ @{ RootModule = 'PSProjectStatus.psm1' - ModuleVersion = '0.14.1' + ModuleVersion = '0.15.0' CompatiblePSEditions = 'Desktop', 'Core' GUID = 'ec249544-dc4e-4e24-aae8-4281ec84f54d' Author = 'Jeff Hicks' CompanyName = 'JDH Information Technology Solutions, Inc.' - Copyright = '(c) 2022-2024 JDH Information Technology Solutions, Inc. All rights reserved.' + Copyright = '(c) 2022-2025 JDH Information Technology Solutions, Inc. All rights reserved.' Description = 'A set of PowerShell tools for tracking module development status. The module uses a JSON file to create a custom object with information about your module. You can use this internally to track the status of your module including a simple to-do tracker. This module was first described at https://jdhitsolutions.com/blog/powershell/8960/introducing-psprojectstatus/' PowerShellVersion = '5.1' TypesToProcess = @('types\psprojectstatus.types.ps1xml') @@ -17,7 +17,7 @@ 'Set-PSProjectStatus', 'Get-PSProjectGitStatus', 'Get-PSProjectReport', 'Get-PSProjectTask', 'New-PSProjectTask', 'Remove-PSProjectTask', - 'Update-PSProjectStatus' + 'Update-PSProjectStatus', 'Open-PSProjectStatusHelp' ) AliasesToExport = @('gpstat', 'npstat', 'spstat', 'gitstat','nptask') PrivateData = @{ @@ -26,7 +26,58 @@ LicenseUri = 'https://github.com/jdhitsolutions/PSProjectStatus/blob/main/License.txt' ProjectUri = 'https://github.com/jdhitsolutions/PSProjectStatus' IconUri = 'https://raw.githubusercontent.com./jdhitsolutions/PSProjectStatus/main/images/psproject-icon.png' - ReleaseNotes = 'https://github.com/jdhitsolutions/PSProjectStatus/blob/main/changelog.md' + ReleaseNotes = @' +## [0.15.0] - 2025-01-06 + +### Added + +- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file. +- Updated help documentation. + +### Changed + +- Updated verbose messaging. +- Updated `README.md`. + +### Fixed + +- Fixed bug in JSON schema for required `RemoteRegistry` properties. +- Fixed layout errors in the changelog. + +## [0.15.0] - 2025-01-06 + +### Added + +- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file. +- Updated help documentation. + +### Changed + +- Updated verbose messaging.@' +## [0.15.0] - 2025-01-06 + +### Added + +- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file. +- Updated help documentation. + +### Changed + +- Updated verbose messaging. +- Updated `README.md`. + +### Fixed + +- Fixed bug in JSON schema for required `RemoteRegistry` properties. +- Fixed layout errors in the changelog. + +- Updated `README.md`. + +### Fixed + +- Fixed bug in JSON schema for required `RemoteRegistry` properties. +- Fixed layout errors in the changelog. +'@ RequireLicenseAcceptance = $false } } diff --git a/PSProjectStatus.psm1 b/PSProjectStatus.psm1 index 8757aac..341a055 100644 --- a/PSProjectStatus.psm1 +++ b/PSProjectStatus.psm1 @@ -23,7 +23,7 @@ ForEach-Object { #region class definitions -enum PSProjectStatus { +Enum PSProjectStatus { Development Updating Stable @@ -42,6 +42,12 @@ Enum gitMode { push } +#the default task priority will be medium +Enum PSProjectTaskPriority { + Medium + Low + High +} Class PSProjectRemote { [string]$Name [string]$Url @@ -59,11 +65,34 @@ Class PSProjectRemote { } } +Class PSProjectTask { + [int32]$TaskID + [string]$TaskName + [string]$TaskDescription + [PSProjectTaskPriority]$Priority + [string[]]$TaskTags + [DateTime]$Created = (Get-Date) + [DateTime]$DueDate + [DateTime]$CompletedDate + [ValidateRange(0, 100)] + [Int32]$Progress = 0 + [string]$AssignedTo = [System.Environment]::Username + [System.Boolean]$Completed = $false + + PSProjectTask ([string]$TaskName) { + # $this.TaskID = _getNextTaskID + $this.TaskName = $TaskName + #$this.TaskDescription = $Description + } + PSProjectTask () { + + } +} Class PSProject { [string]$Name = (Split-Path (Get-Location).path -Leaf) [string]$Path = (Convert-Path (Get-Location).path) [DateTime]$LastUpdate = (Get-Date) - [string[]]$Tasks = @() + [PSProjectTask[]]$Tasks = @() [PSProjectStatus]$Status = 'Development' [Version]$ProjectVersion = (Test-ModuleManifest -Path ".\$(Split-Path $pwd -Leaf).psd1" -Verbose:$False -ErrorAction SilentlyContinue).version [string]$GitBranch = '' @@ -134,7 +163,7 @@ This would be a major breaking change #> -Class PSProjectTask { +<# Class PSProjectTask { [string]$ProjectName [string]$Path [string]$TaskDescription @@ -147,7 +176,7 @@ Class PSProjectTask { $this.TaskDescription = $TaskDescription $this.ProjectVersion = $ProjectVersion } -} +} #> #endregion diff --git a/README.md b/README.md index 32c7553..5c1df05 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ This module is supported in Windows PowerShell 5.1 and PowerShell 7. - [New-PSProjectStatus](docs/New-PSProjectStatus.md) - [Get-PSProjectStatus](docs/Get-PSProjectStatus.md) - [Set-PSProjectStatus](docs/Set-PSProjectStatus.md) -- + ### Tasks + - [New-PSProjectTask](docs/New-PSProjectTask.md) - [Get-PSProjectTask](docs/Get-PSProjectTask.md) - [Remove-PSProjectTask](docs/Remove-PSProjectTask.md) @@ -37,89 +38,98 @@ This module is supported in Windows PowerShell 5.1 and PowerShell 7. - [Get-PSProjectReport](docs/Get-PSProjectReport.md) - [Get-PSProjectGitStatus](docs/Get-PSProjectGitStatus.md) +- [Open-PSProjectStatusHelp](docs/Open-PSProjectStatusHelp.md) + +After importing the module you can run `Open-PSProjectStatusHelp` which will open a PDF version of this document in the default application associated with PDF files. Or you can use the -`AsMarkdown` parameter to read this file using markdown formatting. Not all markdown features may properly render in the console. ## Class-Based The project status is based on a private class-based definition. The PowerShell classes are used to construct the JSON file which in turn is used to create a `PSProject` object and update its properties. - ```powershell Class PSProjectRemote { - [string]$Name - [string]$Url - [gitMode]$Mode - - PSProjectRemote ($Name, $url, $mode) { - $this.Name = $Name - $this.url = $url - $this.mode = $mode - } - #allow an empty remote setting - PSProjectRemote() { - $this.Name = '' - $this.url = '' - } + [string]$Name + [string]$Url + [gitMode]$Mode + + PSProjectRemote ($Name, $url, $mode) { + $this.Name = $Name + $this.url = $url + $this.mode = $mode + } + #allow an empty remote setting + PSProjectRemote() { + $this.Name = '' + $this.url = '' + } } +#I have formatted longer lines with artificial line breaks to fit a printed page. Class PSProject { - [string]$Name = (Split-Path (Get-Location).path -Leaf) - [string]$Path = (Convert-Path (Get-Location).path) - [DateTime]$LastUpdate = (Get-Date) - [string[]]$Tasks = @() - [PSProjectStatus]$Status = 'Development' - [Version]$ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" -ErrorAction SilentlyContinue).version - [string]$GitBranch = '' - #using .NET classes to ensure compatibility with non-Windows platforms - [string]$UpdateUser = "$([System.Environment]::UserDomainName)\$([System.Environment]::Username)" - [string]$Computername = [System.Environment]::MachineName - [PSProjectRemote[]]$RemoteRepository = @() - [string]$Comment = '' - - [void]Save() { - $json = Join-Path -Path $this.path -ChildPath psproject.json - #convert the ProjectVersion to a string in the JSON file - #convert the LastUpdate to a formatted date string - $this | Select-Object @{Name = '$schema'; Expression = { 'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/psproject.schema.json' } }, - Name, Path, - @{Name = 'LastUpdate'; Expression = { '{0:o}' -f $_.LastUpdate } }, - @{Name = 'Status'; Expression = { $_.status.toString() } }, - @{Name = 'ProjectVersion'; Expression = { $_.ProjectVersion.toString() } }, - UpdateUser, Computername, RemoteRepository, Tasks, GitBranch, Comment | - ConvertTo-Json | Out-File -FilePath $json -Encoding utf8 - } - [void]RefreshProjectVersion() { - $this.ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" -ErrorAction SilentlyContinue).version - } - [void]RefreshUser() { - $this.UpdateUser = "$([System.Environment]::UserDomainName)\$([System.Environment]::Username)" - } - [void]RefreshComputer() { - $this.Computername = [System.Environment]::MachineName - } - [void]RefreshRemoteRepository() { - if (Test-Path .git) { - $remotes = git remote -v - if ($remotes) { - $repos = @() - foreach ($remote in $remotes) { - $split = $remote.split() - $RemoteName = $split[0] - $Url = $split[1] - $Mode = $split[2].replace('(', '').Replace(')', '') - $repos += [PSProjectRemote]::new($RemoteName, $url, $mode) - } #foreach - $this.RemoteRepository = $repos - } #if remotes found - } - } - - [void]RefreshAll() { - $this.RefreshProjectVersion() - $this.RefreshUser() - $this.RefreshComputer() - $this.RefreshRemoteRepository() - $this.Save() - } + [string]$Name = (Split-Path (Get-Location).path -Leaf) + [string]$Path = (Convert-Path (Get-Location).path) + [DateTime]$LastUpdate = (Get-Date) + [string[]]$Tasks = @() + [PSProjectStatus]$Status = 'Development' + [Version]$ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" ` + -ErrorAction SilentlyContinue).version + [string]$GitBranch = '' + #using .NET classes to ensure compatibility with non-Windows platforms + [string]$UpdateUser = "$([System.Environment]::UserDomainName)\` + $([System.Environment]::Username)" + [string]$Computername = [System.Environment]::MachineName + [PSProjectRemote[]]$RemoteRepository = @() + [string]$Comment = '' + + [void]Save() { + $json = Join-Path -Path $this.path -ChildPath psproject.json + #convert the ProjectVersion to a string in the JSON file + #convert the LastUpdate to a formatted date string + $this | Select-Object @{Name = '$schema'; Expression = { + 'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/ + psproject.schema.json' } }, + Name, Path, + @{Name = 'LastUpdate'; Expression = { '{0:o}' -f $_.LastUpdate } }, + @{Name = 'Status'; Expression = { $_.status.toString() } }, + @{Name = 'ProjectVersion'; Expression = { $_.ProjectVersion.toString() } }, + UpdateUser, Computername, RemoteRepository, Tasks, GitBranch, Comment | + ConvertTo-Json | Out-File -FilePath $json -Encoding utf8 + } + [void]RefreshProjectVersion() { + $this.ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" ` + -ErrorAction SilentlyContinue).version + } + [void]RefreshUser() { + $this.UpdateUser = "$([System.Environment]::UserDomainName)\` + $([System.Environment]::Username)" + } + [void]RefreshComputer() { + $this.Computername = [System.Environment]::MachineName + } + [void]RefreshRemoteRepository() { + if (Test-Path .git) { + $remotes = git remote -v + if ($remotes) { + $repos = @() + foreach ($remote in $remotes) { + $split = $remote.split() + $RemoteName = $split[0] + $Url = $split[1] + $Mode = $split[2].replace('(', '').Replace(')', '') + $repos += [PSProjectRemote]::new($RemoteName, $url, $mode) + } #foreach + $this.RemoteRepository = $repos + } #if remotes found + } + } + + [void]RefreshAll() { + $this.RefreshProjectVersion() + $this.RefreshUser() + $this.RefreshComputer() + $this.RefreshRemoteRepository() + $this.Save() + } }``` The class includes a status enumeration. @@ -187,7 +197,8 @@ To create a project status file, navigate to the module root and run [New-PSProj You can update properties when you create the project status. ```powershell -New-PSProjectStatus -LastUpdate (Get-Item .\*.psd1).LastWriteTime -Status Updating -tasks "update help" +New-PSProjectStatus -LastUpdate (Get-Item .\*.psd1).LastWriteTime -Status Updating ` +-tasks "update help" ``` ![new custom project status](images/new-psprojectstatus2.png) @@ -196,10 +207,11 @@ The command will create `psproject.json` in the root folder. ```json { - "$schema": "https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/psproject.schema.json", + "$schema": "https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/ + main/psproject.schema.json", "Name": "PSHelpDesk", "Path": "C:\\Scripts\\PSHelpDesk", - "LastUpdate": "2023-02-20T09:47:33-05:00", + "LastUpdate": "2024-02-20T09:47:33-05:00", "Status": "Updating", "ProjectVersion": "0.1.0", "UpdateUser": "PROSPERO\\Jeff", @@ -225,12 +237,11 @@ The easiest way to view a project status is by using [Get-PSProjectStatus](docs/ ```powershell PS C:\scripts\PSCalendar> Get-PSProjectStatus - Name: PSCalendar [C:\Scripts\PSCalendar] LastUpdate Status Tasks GitBranch Age ---------- ------ ----- --------- --- -3/3/2022 10:24:49 AM Patching {Update help docu... 2.9.0 12.07:07 +3/3/2024 10:24:49 AM Patching {Update help docu... 2.9.0 12.07:07 ``` If the PowerShell host supports ANSI, a status of `Stable` will be displayed in Green. `Development` will be shown in Red and `Updating` in Yellow. @@ -240,14 +251,13 @@ The module has a default list view. ```powershell PS C:\scripts\PSCalendar> Get-PSProjectStatus | Format-List - Project: PSCalendar [C:\Scripts\PSCalendar] Version : 2.9.0 Status : Patching Tasks : {Update help documentation, Issue #31, Issue #34, Issue #33} GitBranch : 2.9.0 -LastUpdate : 3/3/2022 10:24:49 AM +LastUpdate : 3/3/2024 10:24:49 AM ``` This makes it easier to view tasks. @@ -281,14 +291,17 @@ Archive = 10 Or use the [Set-PSProjectStatus](docs/Set-PSProjectStatus.md) function. ```powershell -PS C:\scripts\PSHelpDesk> Set-PSProjectStatus -LastUpdate (Get-Date) -Status Development -Tasks "add printer status function","revise user password function" -Concatenate +PS C:\scripts\PSHelpDesk\> $tasks = "add printer status function", +"revise user password function" +PS C:\scripts\PSHelpDesk> Set-PSProjectStatus -LastUpdate (Get-Date) ` +-Status Development -Tasks $tasks -Concatenate Name: PSHelpDesk [C:\Scripts\PSHelpDesk] -LastUpdate Status Tasks GitBranch Age ----------- ------ ----- --------- --- -3/15/2023 5:53:54 PM Development {update help, add... dev 00.00:00 +LastUpdate Status Tasks GitBranch Age +---------- ------ ----- --------- --- +3/15/2024 5:53:54 PM Development {update help, add... dev 00.00:00 ``` When defining tasks, use `-Concatenate` to append the tasks. Otherwise, tasks will be overwritten with the new value. @@ -310,7 +323,7 @@ Name : WingetTools Status : Stable Version : GitBranch : main -LastUpdate : 3/17/2023 9:46:35 AM +LastUpdate : 3/17/2024 9:46:35 AM Age : 9.00:22:39.3936893 Path : C:\Scripts\WingetTools ProjectVersion : @@ -349,13 +362,15 @@ $p.save() This module is intended to be a _simple_ project management tool. You can use it to track tasks or to-do items. These are added to the `Tasks` property as an array of strings. You can manually add them to the JSON file or use the `Set-PSProjectStatus` function. ```powershell -C:\Scripts\PSProjectStatus> Set-PSProjectStatus -Tasks "Update missing online help links" -Concatenate +C:\Scripts\PSProjectStatus> $params = @{Tasks="Update missing online help links"; +Concatenate=$true} +C:\Scripts\PSProjectStatus> Set-PSProjectStatus @params Name: PSProjectStatus [C:\Scripts\PSProjectStatus] LastUpdate Status Tasks GitBranch Age ---------- ------ ----- --------- --- -12/22/2023 9:08:30 AM Updating {Consider a schema … 0.11.0 00.00:00 +12/22/2024 9:08:30 AM Updating {Consider a schema … 0.11.0 00.00:00 ``` Or you can use the task-related commands. @@ -379,7 +394,8 @@ Remove-PSProjectTask -TaskID 4 If you have many projects, you can use this module to manage all of them. ```powershell -Get-ChildItem -Path c:\scripts -Directory | Get-PSProjectStatus -WarningAction SilentlyContinue +Get-ChildItem -Path c:\scripts -Directory | +Get-PSProjectStatus -WarningAction SilentlyContinue ``` ![list projects](images/list-projects.png) @@ -394,8 +410,12 @@ You will want to suppress Warning messages. If you are running PowerShell 7 and Import-Module PSProjectStatus -Force +#Enumerate all directories and get the project status for each $all = Get-ChildItem -Path C:\scripts -Directory | Get-PSProjectStatus -WarningAction SilentlyContinue + +#Pipe directory output to Out-ConsoleGridView +#and open the selected project in VS Code $all | Sort-Object Status, LastUpdate | Select-Object Path, Status, @{Name = "Tasks"; Expression = { $_.Tasks -join ',' } }, @@ -473,7 +493,7 @@ Status : Development Tasks : {prototype} Tags : {beta, tui} GitBranch : -LastUpdate : 12/27/2023 5:11:30 PM +LastUpdate : 12/27/2024 5:11:30 PM Age : 00:02:48.0251636 ``` @@ -486,7 +506,7 @@ PS C:\> Get-PSProjectReport -path c:\scripts -Tag json LastUpdate Status Tasks GitBranch Age ---------- ------ ----- --------- --- -12/27/2023 5:16:52 PM Updating {Create TUI-based m… 0.12.0 00.00:00 +12/27/2024 5:16:52 PM Updating {Create TUI-based m… 0.12.0 00.00:00 ``` If you want to remove tags, either manually edit the JSON file or use `Set-PSProjectStatus` and set an empty array. @@ -506,7 +526,8 @@ If no you longer want to track the project status for a given folder, simply del The commands in this module have defined type extensions. Alias and script properties have been defined. ```powershell -PS C:\Scripts\PSProjectStatus> Get-PSProjectstatus | Get-Member -MemberType Properties,PropertySet +PS C:\Scripts\PSProjectStatus> Get-PSProjectstatus | +Get-Member -MemberType Properties,PropertySet TypeName: PSProject @@ -534,7 +555,7 @@ Age ScriptProperty System.Object Age {get=(Get-Date) - $this.las... The property sets make it easier to display a group of related properties. ```powershell -PS C:\Scripts\PSProjectStatus> Get-PSProjectstatus | Select Info +PS C:\Scripts\PSProjectStatus> Get-PSProjectstatus | Select-Object Info Name : PSProjectStatus Status : AcceptanceTesting @@ -546,7 +567,7 @@ Tasks : {Create TUI-based management tools, Consider extending schema for a Tags : {} Comment : none -PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Select-Object VersionInfo,age +PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Select-Object VersionInfo,Age Name : PSProjectStatus Status : AcceptanceTesting @@ -565,14 +586,15 @@ PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Format-List Project: PSProjectStatus [C:\Scripts\PSProjectStatus] -Version : 0.12.0 +Version : 0.15.0 Status : Updating -Tasks : {Create TUI-based management tools, Consider extending schema for a structured Task item [Issue 10], - Pester tests, Update README…} -Tags : {json} -GitBranch : 0.12.0 -LastUpdate : 12/28/2023 5:51:42 PM -Age : 00:14:21.9538891 +Tasks : {Create TUI-based management tools, Consider extending schema for + a structured Task item [Issue 10], Pester tests, Consider adding a + project type, eg module, to the schema…} +Tags : {json, class-based} +GitBranch : 0.15.0 +LastUpdate : 7/16/2024 1:07:22 PM +Age : 173.20:28:04 ``` There is also a named view you can use. @@ -583,10 +605,12 @@ PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Format-List -View info Project: PSProjectStatus [C:\Scripts\PSProjectStatus] Status : Updating -Tasks : {Create TUI-based management tools, Consider extending schema for a structured Task item [Issue 10], Pester tests, Update README…} -Tags : {json} -Comment : none -Age : 00.00:16:04 +Tasks : {Create TUI-based management tools, Consider extending schema for a + structured Task item [Issue 10], Pester tests, Consider adding a + project type, eg module, to the schema…} +Tags : {json, class-based} +Comment : +Age : 173.20:28:37 ``` ### Verbose, Warning, and Debug @@ -673,9 +697,11 @@ These are a few things I'm considering or have been suggested. + Additional properties + priority + project type -+ Editor integration to manage project tasks. -+ A WPF or TUI form to display the project status and make it easier to edit tasks. ++ Editor integration to manage project tasks ++ Extending the schema to support tasks ++ Archiving completed tasks to a separate JSON file ++ A WPF or TUI form to display the project status and make it easier to edit tasks 🗨️ If you have any suggestions on how to extend this module or tips to others on how you are using it, please feel free to use the [Discussions](https://github.com/jdhitsolutions/PSProjectStatus/discussions) section of this module's GitHub repository. -> :+1: Project icon by [Icons8](https://icons8.com) +> :thumbsup: Project icon by [Icons8](https://icons8.com) diff --git a/changelog.md b/changelog.md index 5b3d817..312aba6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,25 @@ # Changelog for PSProjectStatus -## v0.14.1 +## [Unreleased] + +## [0.15.0] - 2025-01-06 + +### Added + +- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file. +- Updated help documentation. + +### Changed + +- Updated verbose messaging. +- Updated `README.md`. + +### Fixed + +- Fixed bug in JSON schema for required `RemoteRegistry` properties. +- Fixed layout errors in the changelog. + +## [v0.14.1] - 2024-02-15 ### Changed @@ -8,13 +27,13 @@ ### Added -- Added alias `nptask` for `New-PSProjectTask +- Added alias `nptask` for `New-PSProjectTask`. -## v0.14.0 +## [v0.14.0] - 2024-01-21 ### Fixed -- Updated commands to better store status path when using non-Windows systems. [Issue #11](https://github.com/jdhitsolutions/PSProjectStatus/issues/11) +- Updated commands to better store the status path when using non-Windows systems. [Issue #11](https://github.com/jdhitsolutions/PSProjectStatus/issues/11) - Updated `Set-PSProjectStatus` to insert empty arrays for Tasks and Tags when not specified. ### Changed @@ -23,13 +42,13 @@ - Help updates. - Updated `README` -## v0.13.1 +## [v0.13.1] - 2024-01-04 ### Fixed -- Fixed bug in `Set-PSProjectStatus` that was deleting existing tags. -- -## v0.13.0 +- Fixed a bug in `Set-PSProjectStatus` that was deleting existing tags. + +## [v0.13.0] - 2024-01-02 ### Added @@ -40,7 +59,7 @@ - Modified verbose output in the `Begin` block of module functions to only show metadata when the command is invoked directly. This will eliminate redundant metadata when a function is called from another function. - Moved command color highlighting to the `_verbose` helper function. The function will detect the associated ANSI escape sequence for each command from `$PSProjectANSI` and apply it to the command name. -- Updated formatting file to display `Age` with out millisecond value. +- Updated formatting file to display `Age` without millisecond value. - Updated `README.md`. ### Fixed @@ -52,36 +71,13 @@ - Removed alias `Update-PSProjectStatus` because it was conflicting with the VSCode update extension.` -## v0.12.0 - -### Added - -- Added support for tags to `New-PSProjectStatus`, `Set-PSProjectStatus`, and `Get-PSProjectReport`. Modified format file to display tags in the default list view. This also necessitated a change to the [JSON schema file](psproject.schema.json). [[Issue #8](https://github.com/jdhitsolutions/PSProjectStatus/issues/8)] -- Added localized string data file `psprojectstatus.psd1` -- Added a private function to display verbose messaging. -- Added a new formatted list view called `info` to display `Tasks`, `Tags`, and `Comment` properties. -- Added a custom property set called `Info` to display `Name`,`Status`,`Version`,`GitBranch`,`Tasks`,`Tags`, and `Comment` properties. -- Defined alias `Update-PSProjectStatus` for `Set-PSProjectStatus`. -- Added an exported variable, `PSProjectStatusModule` for the module version. This variable is used in verbose messaging. This necessitated using `Export-ModuleMember` in the root module file. - -### Changed - -- Modified format file for PSProjectStatus to display project name in `Cyan`. This applies to table and list views. -- Modified verbose, warning and debug messages to use localized string data. -- Modified JSON schema to require the `LastUpdated` property. -- Help updates. - -### Fixed - -- Fixed format files to not use ANSI escape sequences if the PowerShell ISE is detected. - -## v0.11.1 +## [v0.11.1] - 2023-12-22 ### Fixed - Added missing online help links. -## v0.11.0 +## [v0.11.0] - 2023-12-22 ### Fixed @@ -91,7 +87,7 @@ - Updated `README.md`. - Updated `Set-PSProjectStatus` to use the current date time as the default for the `LastUpdate` parameter. __This is a potential breaking change.__ -- Updated `New-PSProjectStatus`to not overwrite an existing file if found. Added a `-Force` parameter. +- Updated `New-PSProjectStatus` not to overwrite an existing file if found. Added a `-Force` parameter. - Updated Verbose output in all commands. - Help updates @@ -101,7 +97,7 @@ - Added custom format file `psprojecttask.format.ps1xml` - Added commands `New-PSProjectTask` and `Remove-PSProjectTask`. -## v0.10.1 +## [v0.10.1] - 2023-08-04 ### Fixed @@ -113,7 +109,7 @@ - Added missing online help links -## 0.10.0 +## [0.10.0] - 2023-01-28 ### Added @@ -127,50 +123,70 @@ - Updated help content. - Updated `README.md` -## 0.9.2 +## [0.9.2] - 2023-01-24 + +### Fixed - Another fix to handling no RemoteRepository settings in the JSON file. -## 0.9.1 +## [0.9.1] - 2023-01-23 + +### Fixed - Update commands to use an empty array `[]` for `RemoteRepository` setting if nothing is detected. -## 0.9.0 +## [0.9.0] - 2022-10-05 + +### Changed - Insert `[]` for empty tasks and remote repositories. -- Update to property descriptions in the JSON schema. -- Set default `LastUpdate` value to use value from `Get-Date -format o`. This provides a consistent value between PowerShell versions. Although converting `Get-Date` to JSON will still work. +- Updated property descriptions in the JSON schema. +- Set default `LastUpdate` value to use the value from `Get-Date -format o`. This provides a consistent value between PowerShell versions. Although converting `Get-Date` to JSON will still work. - Help updates. -## 0.8.1 +## [0.8.1] - 2022-07-18 - fixed version number. -## 0.8.0 +## [0.8.0] - 2022-07-18 + +### Added + +- Added JSON schema file and updated code to insert the schema reference into the `psproject.json` file. + +### Changed -- Added JSON schema file and update code to insert the schema reference into the `psproject.json` file. - Modified the code to save the JSON file to store the `Status` as its string value. This makes the file compatible with the new schema. - Updated `README.md`. -## 0.7.0 +## [0.7.0] - 2022-04-13 + +### Changed - Updated `Save()` method to specify UTF-8 file encoding for the JSON file. - Updated module manifest. - Updated missing online help links. -## 0.6.0 +## [0.6.0] - 2022-03-29 + +### Added - Added `Comment` property to the `PSProject` class. - Added `Comment` parameter to `New-PSProjectStatus` and `Set-PSProjectStatus`. - Added alias property `Username` for `UpdateUser`. - Suppressed error message from `New-PSProjectStatus` when the project folder isn't initialized as a git repository. -- Added `Update-PSProjectStatus` as function for VSCode and the PowerShell ISE. +- Added `Update-PSProjectStatus` as a function for VSCode and the PowerShell ISE. - Added `Get-PSProjectGitStatus` with an alias of `gitstat`. - Added a `RefreshAll()` method to the `PSProject` class. This will run all refresh methods __AND__ save the file. + +### Changed + - Help updates. - Updated `README.md`. -## 0.5.0 +## [0.5.0] - 2022-03-26 + +### Added - Added online help links. - Added alias `gpstat` for `Get-PSProjectStatus`. @@ -178,37 +194,66 @@ - Added alias `spstat` for `Set-PSProjectStatus`. - Added remote repository property. [Issue #5]( https://github.com/jdhitsolutions/PSProjectStatus/issues/5) - Added project version property. [Issue #6]( https://github.com/jdhitsolutions/PSProjectStatus/issues/6) -- Updated format ps1xml file adding `ProjectVersion` to the list view. - Added property set `versionInfo` defined in `types\psprojectstatus.types.ps1xml`. -- Added methods to the `PSProject` class to manually update or refresh property values. This is helpful for update projects created before additional properties were added. +- Added methods to the `PSProject` class to manually update or refresh property values. This is useful for updating projects created before additional properties were added. + +### Changed + - Help updates. +- Updated format ps1xml file adding `ProjectVersion` to the list view. - Updated `README.md`. -## v0.4.0 +## v0.4.0 - 2022-03-16 + +### Changed - Updated module commands to include an `UpdateUser` property. - Help updates. - Updated `README`. - Published module to the PowerShell Gallery -## v0.3.0 +## v0.3.0 - 2022-03-15 + +### Added -- Update `README.md` -- Updated private data in the module manifest. - Added parameter alias `add` to `Concatenate` in `Set-PSProjectStatus`. - Added parameter alias `FullName` to `Path` in `Get-PSProjectStatus`. -## v0.2.0 +### Changed + +- Update `README.md` +- Updated private data in the module manifest. + +## v0.2.0 - 2022-03-15 + +### Added -- Modified commands to ignore `Age` type extension. - Added format view for `Get-PSProjectStatus`. -- Modified `New-PSProjectStatus` to convert all paths to full filesystem paths and not PSDrives. - Added additional status values. - Added help documentation. -- Updated `psproject.format.ps1xml` to adjust table widths. Added a default list view. -## v0.1.0 -## [Unreleased] -### Changed -- Updated documentation +## Changed + +- Modified commands to ignore `Age` type extension. +- Modified `New-PSProjectStatus` to convert all paths to full filesystem paths and not PSDrives. +- Updated `psproject.format.ps1xml` to adjust table widths. Added a default list view. +[Unreleased]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.15.0..HEAD +[0.15.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/vv0.14.1..v0.15.0 +[v0.14.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.14.0..v0.14.1 +[v0.14.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.13.1..v0.14.0 +[v0.13.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.13.0..v0.13.1 +[v0.13.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.12.0..v0.13.0 +[v0.12.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.11.1..v0.12.0 +[v0.11.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.11.0..v0.11.1 +[v0.11.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.10.1..v0.11.0 +[v0.10.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.10.0..v0.10.1 +[0.10.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.9.2..v0.10.0 +[0.9.2]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.9.1..v0.9.2 +[0.9.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.9.0..v0.9.1 +[0.9.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.8.1..v0.9.0 +[0.8.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.8.0..v0.8.1 +[0.8.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.7.0..v0.8.0 +[0.7.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.6.0..b0.7.0 +[0.6.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.5.0..v0.6.0 +[0.5.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.4.0..v0.5.0 \ No newline at end of file diff --git a/docs/Get-PSProjectReport.md b/docs/Get-PSProjectReport.md index 7f70833..df5c98d 100644 --- a/docs/Get-PSProjectReport.md +++ b/docs/Get-PSProjectReport.md @@ -14,19 +14,22 @@ Manage all your PSProject folders. ## SYNTAX ### status (Default) -``` + +```yaml Get-PSProjectReport [-Path] [-Status ] [-Tag ] [] ``` ### older -``` + +```yaml Get-PSProjectReport [-Path] [-Status ] [-OlderThan ] [-Tag ] [] ``` ### newer -``` + +```yaml Get-PSProjectReport [-Path] [-Status ] [-NewerThan ] [-Tag ] [] ``` @@ -143,6 +146,7 @@ Accept wildcard characters: False ``` ### -Tag + Get projects with a specific tag. You can combine this with other filtering parameters. ```yaml @@ -158,6 +162,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Get-PSProjectStatus.md b/docs/Get-PSProjectStatus.md index 671aabc..e2f42d0 100644 --- a/docs/Get-PSProjectStatus.md +++ b/docs/Get-PSProjectStatus.md @@ -13,7 +13,7 @@ Get project status. ## SYNTAX -``` +```yaml Get-PSProjectStatus [[-Path] ] [] ``` @@ -30,9 +30,9 @@ PS C:\Scripts\PSClock> Get-PSProjectStatus Name: PSClock [C:\Scripts\PSClock] -LastUpdate Status Tasks GitBranch Age ----------- ------ ----- --------- --- -3/2/2022 3:43:34 PM Stable main 12.19:14 +LastUpdate Status Tasks GitBranch Age +---------- ------ ----- --------- --- +10/17/2024 1:00:56 PM Stable {Pester tests} main 80.20:40 ``` Get the status from the current directory. @@ -117,6 +117,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Get-PSProjectTask.md b/docs/Get-PSProjectTask.md index a082fb2..bcc4b61 100644 --- a/docs/Get-PSProjectTask.md +++ b/docs/Get-PSProjectTask.md @@ -13,7 +13,7 @@ List project tasks ## SYNTAX -``` +```yaml Get-PSProjectTask [[-Path] ] [-TaskID ] [] ``` @@ -53,6 +53,7 @@ Get a task by ID number. ## PARAMETERS ### -Path + Enter the parent path to the psproject.json file, e.g. c:\scripts\mymodule. @@ -69,6 +70,7 @@ Accept wildcard characters: False ``` ### -TaskID + Get a task by its ID number ```yaml @@ -84,6 +86,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/New-PSProjectStatus.md b/docs/New-PSProjectStatus.md index 303fc83..d5b5ac6 100644 --- a/docs/New-PSProjectStatus.md +++ b/docs/New-PSProjectStatus.md @@ -13,7 +13,7 @@ Create a new PSProjectStatus. ## SYNTAX -``` +```yaml New-PSProjectStatus [[-Name] ] [-Path ] [-LastUpdate ] [-Tasks ] [-Tags ] [-Status ] [-ProjectVersion ] [-Comment ] [-Force] [-WhatIf] [-Confirm] [] ``` @@ -202,6 +202,7 @@ Accept wildcard characters: False ``` ### -Force + Overwrite an existing PSProjectStatus file. ```yaml @@ -217,6 +218,7 @@ Accept wildcard characters: False ``` ### -Tags + What tags do you want to assign to this project? ```yaml @@ -232,6 +234,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/New-PSProjectTask.md b/docs/New-PSProjectTask.md index 6d9cbec..c746fd5 100644 --- a/docs/New-PSProjectTask.md +++ b/docs/New-PSProjectTask.md @@ -13,7 +13,7 @@ Create a new task in the PSProject file. ## SYNTAX -``` +```yaml New-PSProjectTask [-TaskDescription] [-Path ] [-PassThru] [-WhatIf] [-Confirm] [] ``` @@ -47,6 +47,7 @@ C:\Scripts\PSProjectStatus> New-PSProjectTask -TaskDescription "Pester tests" -P ## PARAMETERS ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -78,6 +79,7 @@ Accept wildcard characters: False ``` ### -Path + Enter the parent path to the psproject.json file, e.g. c:\scripts\mymodule. @@ -94,6 +96,7 @@ Accept wildcard characters: False ``` ### -TaskDescription + Enter the task description. ```yaml @@ -109,6 +112,7 @@ Accept wildcard characters: False ``` ### -WhatIf + Shows what would happen if the cmdlet runs. The cmdlet is not run. @@ -125,6 +129,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Open-PSProjectStatusHelp.md b/docs/Open-PSProjectStatusHelp.md new file mode 100644 index 0000000..196b060 --- /dev/null +++ b/docs/Open-PSProjectStatusHelp.md @@ -0,0 +1,76 @@ +--- +external help file: PSProjectStatus-help.xml +Module Name: PSProjectStatus +online version: +schema: 2.0.0 +--- + +# Open-PSProjectStatusHelp + +## SYNOPSIS + +Open the PSProjectStatus help document + +## SYNTAX + +```yaml +Open-PSProjectStatusHelp [-AsMarkdown] [] +``` + +## DESCRIPTION + +Use this command to open the PDF help document for the PSProjectStatus module with the associated application for PDF files. As an alternative you can view the documentation as a markdown document. + +## EXAMPLES + +### Example 1 + +```powershell +PS C:\> Open-PSProjectStatusHelp +``` + +The file should open in the default application for PDF files. + +### Example 2 + +```powershell +PS C:\> Open-PSProjectStatusHelp -AsMarkdown | more +``` + +View the help file a markdown document. + +## PARAMETERS + +### -AsMarkdown + +Open the help file as markdown. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: md + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None + +## OUTPUTS + +### None + +## NOTES + +## RELATED LINKS + +[PSProjectStatus GitHub Repository:](https://github.com/jdhitsolutions/PSProjectStatus) \ No newline at end of file diff --git a/docs/Remove-PSProjectTask.md b/docs/Remove-PSProjectTask.md index 700ad80..0153e6b 100644 --- a/docs/Remove-PSProjectTask.md +++ b/docs/Remove-PSProjectTask.md @@ -13,7 +13,7 @@ Remove a task from the PSProject file. ## SYNTAX -``` +```yaml Remove-PSProjectTask [-TaskID] [-Path ] [-WhatIf] [-Confirm] [] ``` @@ -34,6 +34,7 @@ Remove tasks 4 and 2 from the PSProject file. ## PARAMETERS ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -49,6 +50,7 @@ Accept wildcard characters: False ``` ### -Path + Enter the parent path to the psproject.json file, e.g. c:\scripts\mymodule. @@ -65,6 +67,7 @@ Accept wildcard characters: False ``` ### -TaskID + Enter the task ID ```yaml @@ -80,6 +83,7 @@ Accept wildcard characters: False ``` ### -WhatIf + Shows what would happen if the cmdlet runs. The cmdlet is not run. @@ -96,6 +100,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Set-PSProjectStatus.md b/docs/Set-PSProjectStatus.md index ec043a8..449256a 100644 --- a/docs/Set-PSProjectStatus.md +++ b/docs/Set-PSProjectStatus.md @@ -13,7 +13,7 @@ Update a PSProject status. ## SYNTAX -``` +```yaml Set-PSProjectStatus [[-InputObject] ] [[-Name] ] [[-LastUpdate] ] [[-Tasks] ] [-Concatenate] [-Tags ] [[-Status] ] @@ -240,6 +240,7 @@ Accept wildcard characters: False ``` ### -Tags + What tags do you want to assign to this project? If you want to append tags you either have to re-define all tags, or add a tag manually to the psproject.json file. ```yaml @@ -255,6 +256,7 @@ Accept wildcard characters: False ``` ### CommonParameters + This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/en-us/PSProjectStatus-help.xml b/en-us/PSProjectStatus-help.xml index e48a026..590baa7 100644 --- a/en-us/PSProjectStatus-help.xml +++ b/en-us/PSProjectStatus-help.xml @@ -421,9 +421,9 @@ LastUpdate Status Tasks GitBranch Age Name: PSClock [C:\Scripts\PSClock] -LastUpdate Status Tasks GitBranch Age ----------- ------ ----- --------- --- -3/2/2022 3:43:34 PM Stable main 12.19:14 +LastUpdate Status Tasks GitBranch Age +---------- ------ ----- --------- --- +10/17/2024 1:00:56 PM Stable {Pester tests} main 80.20:40 Get the status from the current directory. @@ -1210,6 +1210,96 @@ LastUpdate Status Tasks GitBranch Age + + + Open-PSProjectStatusHelp + Open + PSProjectStatusHelp + + Open the PSProjectStatus help document + + + + Use this command to open the PDF help document for the PSProjectStatus module with the associated application for PDF files. As an alternative you can view the documentation as a markdown document. + + + + Open-PSProjectStatusHelp + + AsMarkdown + + Open the help file as markdown. + + + SwitchParameter + + + False + + + + + + AsMarkdown + + Open the help file as markdown. + + SwitchParameter + + SwitchParameter + + + False + + + + + + None + + + + + + + + + + None + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Open-PSProjectStatusHelp + + The file should open in the default application for PDF files. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Open-PSProjectStatusHelp -AsMarkdown | more + + View the help file a markdown document. + + + + + + PSProjectStatus GitHub Repository: + https://github.com/jdhitsolutions/PSProjectStatus + + + Remove-PSProjectTask diff --git a/en-us/psprojectstatus.psd1 b/en-us/psprojectstatus.psd1 index 70471e7..1ff494d 100644 --- a/en-us/psprojectstatus.psd1 +++ b/en-us/psprojectstatus.psd1 @@ -7,6 +7,7 @@ ConvertFrom-StringData @" DetectedParameterSet = Detected parameter set {0} Ending = Ending PSProjectStatus module command ExistingWarning = $([char]27)[91mAn existing project status file was found. You must either delete the file or re-run this command with -Force.$([char]27)[0m + FailPDF = Failed to open the help file. {0}. You can try opening the help as markdown. FilterNewer = Filtering for projects last updated within the last {0} days FilterOlder = Filtering for projects last updated in the more than {0} days ago FilterStatus = Filtering for status {0} @@ -26,6 +27,8 @@ ConvertFrom-StringData @" NoGitRemote = No git remote detected NoTasks = No tasks found for this project NoTaskID = $([char]27)[91mCould not find a task with an ID of {0} $([char]27)[0m + OpenMarkdownHelp = Opening the help file as markdown + OpenPDFHelp = Attempting to open {0} with the default PDF viewer ProcessPath = Processing PSProject path {0} ProcessProjects = Processing PSProjects under {0} ProcessTasks = Processing tasks in {0} @@ -39,6 +42,7 @@ ConvertFrom-StringData @" UpdateProperty = Updating property {0} UsingHost = Using PowerShell Host {0} UsingModule = Using module PSProjectStatus version {0} + UsingOS = Running under Operating System {0} UsingPath = Using filesystem path {0} UsingSchema = Using schema path {0} "@ \ No newline at end of file diff --git a/functions/public/Get-PSProjectGitStatus.ps1 b/functions/public/Get-PSProjectGitStatus.ps1 index 20eacc7..2c304ef 100644 --- a/functions/public/Get-PSProjectGitStatus.ps1 +++ b/functions/public/Get-PSProjectGitStatus.ps1 @@ -12,6 +12,7 @@ Function Get-PSProjectGitStatus { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } diff --git a/functions/public/Get-PSProjectReport.ps1 b/functions/public/Get-PSProjectReport.ps1 index ca5c1d9..03942b2 100644 --- a/functions/public/Get-PSProjectReport.ps1 +++ b/functions/public/Get-PSProjectReport.ps1 @@ -44,6 +44,7 @@ Function Get-PSProjectReport { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } #begin diff --git a/functions/public/Get-PSProjectStatus.ps1 b/functions/public/Get-PSProjectStatus.ps1 index f662fdc..89a70ed 100644 --- a/functions/public/Get-PSProjectStatus.ps1 +++ b/functions/public/Get-PSProjectStatus.ps1 @@ -22,6 +22,7 @@ Function Get-PSProjectStatus { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } @@ -43,7 +44,6 @@ Function Get-PSProjectStatus { $remote += [PSProjectRemote]::new($repo.name, $repo.url, $repo.mode) } $psproject.RemoteRepository = $remote - } else { Write-Debug ($strings.addProperty -f $property) diff --git a/functions/public/Get-PSProjectTask.ps1 b/functions/public/Get-PSProjectTask.ps1 index 1083e12..476eef6 100644 --- a/functions/public/Get-PSProjectTask.ps1 +++ b/functions/public/Get-PSProjectTask.ps1 @@ -26,6 +26,7 @@ Function Get-PSProjectTask { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } #begin diff --git a/functions/public/New-PSProjectStatus.ps1 b/functions/public/New-PSProjectStatus.ps1 index c97a761..c935bb5 100644 --- a/functions/public/New-PSProjectStatus.ps1 +++ b/functions/public/New-PSProjectStatus.ps1 @@ -45,6 +45,7 @@ Function New-PSProjectStatus { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } diff --git a/functions/public/New-PSProjectTask.ps1 b/functions/public/New-PSProjectTask.ps1 index a4c8e33..ec79aa5 100644 --- a/functions/public/New-PSProjectTask.ps1 +++ b/functions/public/New-PSProjectTask.ps1 @@ -27,6 +27,7 @@ Function New-PSProjectTask { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } #begin diff --git a/functions/public/Open-README.ps1 b/functions/public/Open-README.ps1 new file mode 100644 index 0000000..360ffe2 --- /dev/null +++ b/functions/public/Open-README.ps1 @@ -0,0 +1,54 @@ +Function Open-PSProjectStatusHelp { + [CmdletBinding()] + [OutputType('None')] + Param( + [Parameter(HelpMessage = 'Open the help file as markdown.')] + [Alias('md')] + [switch]$AsMarkdown + ) + + Begin { + $PSDefaultParameterValues['_verbose:Command'] = $MyInvocation.MyCommand + $PSDefaultParameterValues['_verbose:block'] = 'Begin' + _verbose -message $strings.Starting + + if ($MyInvocation.CommandOrigin -eq 'Runspace') { + #Hide this metadata when the command is called from another command + _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) + _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) + _verbose -message ($strings.UsingModule -f $ModuleVersion) + } + + if ($AsMarkdown) { + #need to accommodate the directory structure for this command + #relative to the module root + $docPath = "$PSScriptRoot\..\..\README.md" + } + else { + $docPath = "$PSScriptRoot\..\..\PSProjectStatus-Help.pdf" + } + + } #begin + Process { + $PSDefaultParameterValues['_verbose:block'] = 'Process' + if ($AsMarkdown) { + _verbose -Message $strings.OpenMarkdownHelp + Show-Markdown -Path $docPath + } + else { + Try { + _verbose -message ($strings.OpenPDFHelp -f $docPath) + Invoke-Item -Path $docPath -ErrorAction Stop + } + Catch { + Write-Warning ($strings.FailPDF -f $_.Exception.Message) + } + } + } #process + End { + $PSDefaultParameterValues['_verbose:Command'] = $MyInvocation.MyCommand + $PSDefaultParameterValues['_verbose:block'] = 'End' + _verbose $strings.Ending + } #end +} \ No newline at end of file diff --git a/functions/public/Remove-PSProjectTask.ps1 b/functions/public/Remove-PSProjectTask.ps1 index cae8e51..f9296ee 100644 --- a/functions/public/Remove-PSProjectTask.ps1 +++ b/functions/public/Remove-PSProjectTask.ps1 @@ -25,6 +25,7 @@ Function Remove-PSProjectTask { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } #begin diff --git a/functions/public/Set-PSProjectStatus.ps1 b/functions/public/Set-PSProjectStatus.ps1 index 90a53ae..d81688e 100644 --- a/functions/public/Set-PSProjectStatus.ps1 +++ b/functions/public/Set-PSProjectStatus.ps1 @@ -48,6 +48,7 @@ Function Set-PSProjectStatus { #Hide this metadata when the command is called from another command _verbose -message ($strings.PSVersion -f $PSVersionTable.PSVersion) _verbose -message ($strings.UsingHost -f $host.Name) + _verbose -message ($strings.UsingOS -f $PSVersionTable.OS) _verbose -message ($strings.UsingModule -f $PSProjectStatusModule) } } #begin diff --git a/psproject.schema.json b/psproject.schema.json index 953ccd6..3947742 100644 --- a/psproject.schema.json +++ b/psproject.schema.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/psproject.schema.json", "title": "PSProject Status Schema", - "description": "Schema for the PSProjectStatus configuration file. Version 1.1.0 last updated 27 Dec 2023.", + "description": "Schema for the PSProjectStatus configuration file. Version 1.2.0 last updated 17 April 2024.", "type": "object", "properties": { "Name": { @@ -97,13 +97,13 @@ "description": "push" } ] - }, - "required": [ + } + }, + "required": [ "Name", "Url", "Mode" ] - } } } },