Skip to content

Commit bc68909

Browse files
v0.16.0
1 parent b709656 commit bc68909

26 files changed

Lines changed: 4161 additions & 132 deletions

PSProjectStatus-Help.pdf

-162 KB
Binary file not shown.

PSProjectStatus.psd1

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@{
44
RootModule = 'PSProjectStatus.psm1'
5-
ModuleVersion = '0.15.0'
5+
ModuleVersion = '0.16.0'
66
CompatiblePSEditions = 'Desktop', 'Core'
77
GUID = 'ec249544-dc4e-4e24-aae8-4281ec84f54d'
88
Author = 'Jeff Hicks'
@@ -27,56 +27,22 @@
2727
ProjectUri = 'https://github.com/jdhitsolutions/PSProjectStatus'
2828
IconUri = 'https://raw.githubusercontent.com./jdhitsolutions/PSProjectStatus/main/images/psproject-icon.png'
2929
ReleaseNotes = @'
30-
## [0.15.0] - 2025-01-06
30+
## [0.16.0] - 2025-01-07
3131
3232
### Added
3333
34-
- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file.
35-
- Updated help documentation.
34+
- Added localized verbose messaging, help documentation, and a version of the README help to French. Translations were done with GitHub CoPilot so I can't guarantee the quality.
3635
3736
### Changed
3837
39-
- Updated verbose messaging.
4038
- Updated `README.md`.
41-
42-
### Fixed
43-
44-
- Fixed bug in JSON schema for required `RemoteRegistry` properties.
45-
- Fixed layout errors in the changelog.
46-
47-
## [0.15.0] - 2025-01-06
48-
49-
### Added
50-
51-
- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file.
52-
- Updated help documentation.
53-
54-
### Changed
55-
56-
- Updated verbose messaging.@'
57-
## [0.15.0] - 2025-01-06
58-
59-
### Added
60-
61-
- Added command `Open-PSProjectStatusHelp` to open a PDF version of the `README` file.
6239
- Updated help documentation.
63-
64-
### Changed
65-
66-
- Updated verbose messaging.
67-
- Updated `README.md`.
68-
69-
### Fixed
70-
71-
- Fixed bug in JSON schema for required `RemoteRegistry` properties.
72-
- Fixed layout errors in the changelog.
73-
74-
- Updated `README.md`.
40+
- Revised PDF layout settings.
7541
7642
### Fixed
7743
78-
- Fixed bug in JSON schema for required `RemoteRegistry` properties.
79-
- Fixed layout errors in the changelog.
44+
- Fixed `Get-PSProjectTask` bug. [Issue #14](https://github.com/jdhitsolutions/PSProjectStatus/issues/14).
45+
- Fixed `Open-PSProjectStatusHelp` to make `-AsMarkdown` a dynamic parameter for PowerShell 7. [Issue #13](https://github.com/jdhitsolutions/PSProjectStatus/issues/13)
8046
'@
8147
RequireLicenseAcceptance = $false
8248
}

PSProjectStatus.psm1

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#region load string data
22
# used for culture debugging
3-
# write-host "Importing with culture $(Get-Culture)" -ForeGroundColor yellow
3+
#Write-Host "Importing with culture $(Get-Culture)" -ForeGroundColor yellow
44

55
if ((Get-Culture).Name -match '\w+') {
6-
#write-host "Using culture $(Get-Culture)" -ForegroundColor yellow
6+
#Write-Host "Using culture $(Get-Culture)" -ForegroundColor yellow
77
Import-LocalizedData -BindingVariable strings
88
}
99
else {
1010
#force using En-US if no culture found, which might happen on non-Windows systems.
11-
#write-host "Loading $PSScriptRoot/en-us/PSWorkItem.psd1" -ForegroundColor yellow
11+
#Write-Host "Loading $PSScriptRoot/en-us/PSWorkItem.psd1" -ForegroundColor yellow
1212
Import-LocalizedData -BindingVariable strings -FileName psprojectstatus.psd1 -BaseDirectory $PSScriptRoot/en-us
1313
}
1414

@@ -66,6 +66,11 @@ Class PSProjectRemote {
6666
}
6767

6868
Class PSProjectTask {
69+
<#
70+
this class is designed with future enhancements in mind.
71+
Not all properties are utilized in the current version of the module.
72+
#>
73+
6974
[int32]$TaskID
7075
[string]$TaskName
7176
[string]$TaskDescription
@@ -78,6 +83,8 @@ Class PSProjectTask {
7883
[Int32]$Progress = 0
7984
[string]$AssignedTo = [System.Environment]::Username
8085
[System.Boolean]$Completed = $false
86+
[string]$ProjectName
87+
[string]$Path
8188

8289
PSProjectTask ([string]$TaskName) {
8390
# $this.TaskID = _getNextTaskID
@@ -326,7 +333,7 @@ $jsonSchema = 'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/
326333
#a hash table to store ANSI escape sequences for different commands used in verbose output with the
327334
#private _verbose helper function
328335
$PSProjectANSI = @{
329-
'Get-PSProjectGitStatus' = '[1;38;5;51m'
336+
'Get-PSProjectGitStatus' = '[1;38;5;140m'
330337
'Get-PSProjectReport' = '[1;38;5;111m'
331338
'Get-PSProjectStatus' = '[1;96m'
332339
'Get-PSProjectTask' = '[1;38;5;10m'
@@ -336,10 +343,11 @@ $PSProjectANSI = @{
336343
'Set-PSProjectStatus' = '[1;38;5;214m'
337344
Default = '[1;38;5;51m'
338345
}
346+
339347
Set-Variable -Name PSProjectANSI -Description "a hash table to store ANSI escape sequences for different commands used in verbose output. You can modify settings using ANSI sequences or `$PSStyle"
340348

341349
#Export the module version to a global variable that will be used in Verbose messages
342-
New-Variable -Name PSProjectStatusModule -Value '0.14.0' -Description 'The PSProjectStatus module version used in verbose messaging.'
350+
New-Variable -Name PSProjectStatusModule -Value '0.16.0' -Description 'The PSProjectStatus module version used in verbose messaging.'
343351

344352
Export-ModuleMember -Variable PSProjectStatusModule, PSProjectANSI -Alias 'Update-PSProjectStatus', 'gitstat', 'gpstat', 'npstat', 'spstat'
345353

README.md

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This module is supported in Windows PowerShell 5.1 and PowerShell 7.
4040
- [Get-PSProjectGitStatus](docs/Get-PSProjectGitStatus.md)
4141
- [Open-PSProjectStatusHelp](docs/Open-PSProjectStatusHelp.md)
4242

43-
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.
43+
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 if you are running PowerShell 7, you can use the `-AsMarkdown` dynamic parameter to read this file using markdown formatting. Not all markdown features may render properly in the console.
4444

4545
## Class-Based
4646

@@ -64,15 +64,16 @@ Class PSProjectRemote {
6464
}
6565
}
6666
67-
#I have formatted longer lines with artificial line breaks to fit a printed page.
67+
#I have formatted longer lines with artificial line breaks to fit a
68+
#printed page.
6869
Class PSProject {
6970
[string]$Name = (Split-Path (Get-Location).path -Leaf)
7071
[string]$Path = (Convert-Path (Get-Location).path)
7172
[DateTime]$LastUpdate = (Get-Date)
7273
[string[]]$Tasks = @()
7374
[PSProjectStatus]$Status = 'Development'
74-
[Version]$ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" `
75-
-ErrorAction SilentlyContinue).version
75+
[Version]$ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd `
76+
-Leaf).psd1" -ErrorAction SilentlyContinue).version
7677
[string]$GitBranch = ''
7778
#using .NET classes to ensure compatibility with non-Windows platforms
7879
[string]$UpdateUser = "$([System.Environment]::UserDomainName)\`
@@ -86,18 +87,19 @@ Class PSProject {
8687
#convert the ProjectVersion to a string in the JSON file
8788
#convert the LastUpdate to a formatted date string
8889
$this | Select-Object @{Name = '$schema'; Expression = {
89-
'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/main/
90-
psproject.schema.json' } },
90+
'https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/
91+
main/psproject.schema.json' } },
9192
Name, Path,
92-
@{Name = 'LastUpdate'; Expression = { '{0:o}' -f $_.LastUpdate } },
93-
@{Name = 'Status'; Expression = { $_.status.toString() } },
94-
@{Name = 'ProjectVersion'; Expression = { $_.ProjectVersion.toString() } },
95-
UpdateUser, Computername, RemoteRepository, Tasks, GitBranch, Comment |
93+
@{Name = 'LastUpdate'; Expression = { '{0:o}' -f $_.LastUpdate }},
94+
@{Name = 'Status'; Expression = { $_.status.toString() }},
95+
@{Name = 'ProjectVersion'; Expression = {
96+
$_.ProjectVersion.toString()}},UpdateUser,Computername,
97+
RemoteRepository,Tasks,GitBranch,Comment |
9698
ConvertTo-Json | Out-File -FilePath $json -Encoding utf8
9799
}
98100
[void]RefreshProjectVersion() {
99-
$this.ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd -Leaf).psd1" `
100-
-ErrorAction SilentlyContinue).version
101+
$this.ProjectVersion = (Test-ModuleManifest ".\$(Split-Path $pwd `
102+
-Leaf).psd1" -ErrorAction SilentlyContinue).version
101103
}
102104
[void]RefreshUser() {
103105
$this.UpdateUser = "$([System.Environment]::UserDomainName)\`
@@ -116,7 +118,8 @@ Class PSProject {
116118
$RemoteName = $split[0]
117119
$Url = $split[1]
118120
$Mode = $split[2].replace('(', '').Replace(')', '')
119-
$repos += [PSProjectRemote]::new($RemoteName, $url, $mode)
121+
$repos += [PSProjectRemote]::new($RemoteName, $url,
122+
$mode)
120123
} #foreach
121124
$this.RemoteRepository = $repos
122125
} #if remotes found
@@ -197,8 +200,8 @@ To create a project status file, navigate to the module root and run [New-PSProj
197200
You can update properties when you create the project status.
198201

199202
```powershell
200-
New-PSProjectStatus -LastUpdate (Get-Item .\*.psd1).LastWriteTime -Status Updating `
201-
-tasks "update help"
203+
New-PSProjectStatus -LastUpdate (Get-Item .\*.psd1).LastWriteTime `
204+
-Status Updating -tasks "update help"
202205
```
203206

204207
![new custom project status](images/new-psprojectstatus2.png)
@@ -207,8 +210,8 @@ The command will create `psproject.json` in the root folder.
207210

208211
```json
209212
{
210-
"$schema": "https://raw.githubusercontent.com/jdhitsolutions/PSProjectStatus/
211-
main/psproject.schema.json",
213+
"$schema": "https://raw.githubusercontent.com/jdhitsolutions/
214+
PSProjectStatus/main/psproject.schema.json",
212215
"Name": "PSHelpDesk",
213216
"Path": "C:\\Scripts\\PSHelpDesk",
214217
"LastUpdate": "2024-02-20T09:47:33-05:00",
@@ -255,7 +258,7 @@ PS C:\scripts\PSCalendar> Get-PSProjectStatus | Format-List
255258
256259
Version : 2.9.0
257260
Status : Patching
258-
Tasks : {Update help documentation, Issue #31, Issue #34, Issue #33}
261+
Tasks : {Update help documentation, Issue #31,Issue #34,Issue #33}
259262
GitBranch : 2.9.0
260263
LastUpdate : 3/3/2024 10:24:49 AM
261264
```
@@ -355,15 +358,18 @@ $p.RefreshRemoteRepository()
355358
$p.save()
356359
```
357360

358-
![refresh a project status]As an alternative can use the `RefreshAll()` method which will invoke all the refresh methods __and__ save the file.
361+
As an alternative can use the `RefreshAll()` method which will invoke all the refresh methods __and__ save the file.
359362

360363
## Project Tasks
361364

362365
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.
363366

364367
```powershell
365-
C:\Scripts\PSProjectStatus> $params = @{Tasks="Update missing online help links";
366-
Concatenate=$true}
368+
C:\Scripts\PSProjectStatus> $params = @{
369+
Tasks="Update missing online help links"
370+
Concatenate=$true
371+
}
372+
367373
C:\Scripts\PSProjectStatus> Set-PSProjectStatus @params
368374
369375
Name: PSProjectStatus [C:\Scripts\PSProjectStatus]
@@ -389,6 +395,8 @@ You can manually remove items from the JSON file or use the `Remove-PSProjectTas
389395
Remove-PSProjectTask -TaskID 4
390396
```
391397

398+
Note: *The `PSProjectTask` object is defined in a PowerShell class. The class is defined with future enhancements in mind. Not all defined properties are used at this time.*
399+
392400
## Project Management
393401

394402
If you have many projects, you can use this module to manage all of them.
@@ -542,14 +550,14 @@ LastUpdate Property datetime LastUpdate {get;set;}
542550
Name Property string Name {get;set;}
543551
Path Property string Path {get;set;}
544552
ProjectVersion Property version ProjectVersion {get;set;}
545-
RemoteRepository Property PSProjectRemote[] RemoteRepository {get;set;}
553+
RemoteRepository Property PSProjectRemote[] RemoteRepository ...
546554
Status Property PSProjectStatus Status {get;set;}
547555
Tags Property string[] Tags {get;set;}
548556
Tasks Property string[] Tasks {get;set;}
549557
UpdateUser Property string UpdateUser {get;set;}
550-
Info PropertySet Info {Name, Status, Version, GitBranch, Tasks...
551-
versionInfo PropertySet versionInfo {Name, Status, Version, GitBranch...
552-
Age ScriptProperty System.Object Age {get=(Get-Date) - $this.las...
558+
Info PropertySet Info {Name, Status, Version, GitBranc...
559+
versionInfo PropertySet versionInfo {Name, Status, Version, G...
560+
Age ScriptProperty System.Object Age {get=(Get-Date) - ...
553561
```
554562

555563
The property sets make it easier to display a group of related properties.
@@ -561,13 +569,14 @@ Name : PSProjectStatus
561569
Status : AcceptanceTesting
562570
Version : 0.13.0
563571
GitBranch : 0.13.0
564-
Tasks : {Create TUI-based management tools, Consider extending schema for a
565-
structured Task item [Issue 10],
572+
Tasks : {Create TUI-based management tools, Consider extending schema
573+
for a structured Task item [Issue 10],
566574
Pester tests}
567575
Tags : {}
568576
Comment : none
569577
570-
PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Select-Object VersionInfo,Age
578+
PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus |
579+
Select-Object VersionInfo,Age
571580
572581
Name : PSProjectStatus
573582
Status : AcceptanceTesting
@@ -600,14 +609,15 @@ Age : 173.20:28:04
600609
There is also a named view you can use.
601610

602611
```powershell
603-
PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus | Format-List -View info
612+
PS C:\Scripts\PSProjectStatus> Get-PSProjectStatus |
613+
Format-List -View info
604614
605615
Project: PSProjectStatus [C:\Scripts\PSProjectStatus]
606616
607617
Status : Updating
608-
Tasks : {Create TUI-based management tools, Consider extending schema for a
609-
structured Task item [Issue 10], Pester tests, Consider adding a
610-
project type, eg module, to the schema…}
618+
Tasks : {Create TUI-based management tools, Consider extending schema
619+
for a structured Task item [Issue 10], Pester tests, Consider
620+
adding a project type, eg module, to the schema…}
611621
Tags : {json, class-based}
612622
Comment :
613623
Age : 173.20:28:37
@@ -619,6 +629,8 @@ The commands in this module use localized string data to display verbose, warnin
619629

620630
![Sample verbose output](images/verbose-output.png)
621631

632+
__Note__ *Localized string data to languages other than English was done with GitHub CoPilot, so I can't guarantee the accuracy or quality of the translations. As of version `0.16.0` the supported cultures are `fr-FR`*
633+
622634
The defined ANSI sequences are stored in a hashtable variable called `$PSProjectANSI`.
623635

624636
```powershell
@@ -702,6 +714,6 @@ These are a few things I'm considering or have been suggested.
702714
+ Archiving completed tasks to a separate JSON file
703715
+ A WPF or TUI form to display the project status and make it easier to edit tasks
704716

705-
🗨️ 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.
717+
:left_speech_bubble: 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.
706718

707719
> :thumbsup: Project icon by [Icons8](https://icons8.com)

changelog.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
## [Unreleased]
44

5+
## [0.16.0] - 2025-01-07
6+
7+
### Added
8+
9+
- Added localized verbose messaging, help documentation, and a version of the README help to French. Translations were done with GitHub CoPilot so I can't guarantee the quality.
10+
11+
### Changed
12+
13+
- Updated `README.md`.
14+
- Updated help documentation.
15+
- Revised PDF layout settings.
16+
17+
### Fixed
18+
19+
- Fixed `Get-PSProjectTask` bug. [Issue #14](https://github.com/jdhitsolutions/PSProjectStatus/issues/14).
20+
- Fixed `Open-PSProjectStatusHelp` to make `-AsMarkdown` a dynamic parameter for PowerShell 7. [Issue #13](https://github.com/jdhitsolutions/PSProjectStatus/issues/13)
21+
522
## [0.15.0] - 2025-01-06
623

724
### Added
@@ -238,7 +255,8 @@
238255
- Modified `New-PSProjectStatus` to convert all paths to full filesystem paths and not PSDrives.
239256
- Updated `psproject.format.ps1xml` to adjust table widths. Added a default list view.
240257

241-
[Unreleased]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.15.0..HEAD
258+
[Unreleased]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.16.0..HEAD
259+
[0.16.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.15.0..v0.16.0
242260
[0.15.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/vv0.14.1..v0.15.0
243261
[v0.14.1]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.14.0..v0.14.1
244262
[v0.14.0]: https://github.com/jdhitsolutions/PSProjectStatus/compare/v0.13.1..v0.14.0

0 commit comments

Comments
 (0)