- Get-NozNote: list notes, filter by -Topic, -Status, -Lang - Get-NozNoteContent: fetch markdown, accepts pipeline input by Slug - Set-NozNote: update note content, accepts markdown from pipeline - New-NozNote: create note with frontmatter template - Remove-NozNote: delete note, ShouldProcess + ConfirmImpact.High for safety - NozNote output object: clean PS-friendly properties (no internal Hash field) - NozCmdletBase: shared config loading, API client lifecycle, error translation - Noz.psd1: module manifest for PS 7.2+ - Install-NozModule.ps1: build + install to user module path - NozCli.Core retargeted to net8.0 for PS 7.4 LTS compatibility
29 lines
994 B
PowerShell
29 lines
994 B
PowerShell
#Requires -Version 7.2
|
|
<#
|
|
.SYNOPSIS
|
|
Builds and installs the Noz PowerShell module for the current user.
|
|
.EXAMPLE
|
|
./Install-NozModule.ps1
|
|
./Install-NozModule.ps1 -Verbose
|
|
#>
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$moduleDir = Join-Path ([Environment]::GetFolderPath('MyDocuments')) 'PowerShell' 'Modules' 'Noz'
|
|
|
|
Write-Host "Building Noz.PowerShell..." -ForegroundColor Cyan
|
|
dotnet build "$PSScriptRoot/Noz.PowerShell.csproj" -c Release -v quiet
|
|
|
|
$src = "$PSScriptRoot/bin/Release/net8.0"
|
|
|
|
Write-Host "Installing to: $moduleDir" -ForegroundColor Cyan
|
|
New-Item -ItemType Directory -Force -Path $moduleDir | Out-Null
|
|
|
|
# Copy DLLs and manifest
|
|
Copy-Item "$src/Noz.PowerShell.dll" $moduleDir -Force
|
|
Copy-Item "$src/NozCli.Core.dll" $moduleDir -Force
|
|
Copy-Item "$PSScriptRoot/Noz.psd1" $moduleDir -Force
|
|
|
|
Write-Host "Done. Import with:" -ForegroundColor Green
|
|
Write-Host " Import-Module Noz" -ForegroundColor White
|
|
Write-Host " Get-NozNote -Topic psychologie" -ForegroundColor White
|