noz-cli/Noz.PowerShell/NozNote.cs
kryptomrx db9aabd2b7 feat(powershell): Noz PowerShell module with pipeline-native cmdlets
- 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
2026-05-16 23:42:27 +02:00

29 lines
818 B
C#

using NozCli.Core.Models;
namespace Noz.PowerShell;
/// PS-friendly output object for a noz note.
/// Clean property set — no internal fields like Hash.
public sealed class NozNote
{
public string Slug { get; init; } = "";
public string Title { get; init; } = "";
public string Status { get; init; } = "";
public string Topic { get; init; } = "";
public string Lang { get; init; } = "";
public string? Date { get; init; }
public bool Private { get; init; }
public override string ToString() => Slug;
internal static NozNote From(NoteInfo n) => new()
{
Slug = n.Slug,
Title = n.Title,
Status = n.Status,
Topic = n.Topic,
Lang = n.Lang,
Date = n.Date,
Private = n.Private,
};
}