resources/Note.format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
    <ViewDefinitions>
        <View>
            <Name>Note.Table</Name>
            <ViewSelectedBy>
                <TypeName>Note</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>Date</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Topic</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Body</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $b = ($_.Date).ToString("dd MMM")
                                    $b
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $p = [string]$_.Priority
                                    $b = [string]$_.Topic
                                   switch ($p) {
                                    'High' { "$($PSStyle.Foreground.Red)$b$($PSStyle.Reset)" }
                                    'Medium' { "$($PSStyle.Foreground.Yellow)$b$($PSStyle.Reset)" }
                                    default { $b}
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $b = [string]$_.Body
                                    $p = [string]$_.Priority
                                   switch ($p) {
                                    'High' { "$($PSStyle.Foreground.Red)$b$($PSStyle.Reset)" }
                                    'Medium' { "$($PSStyle.Foreground.Yellow)$b$($PSStyle.Reset)" }
                                    default { $b}
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>