formats/PSBlueskyFeed.format.ps1xml
<?xml version="1.0" encoding="utf-8" ?>
<!--A custom formatting outline--> <Configuration> <ViewDefinitions> <View> <Name>default</Name> <ViewSelectedBy> <TypeName>PSBlueskyFeedItem</TypeName> </ViewSelectedBy> <CustomControl> <CustomEntries> <CustomEntry> <CustomItem> <ExpressionBinding> <ScriptBlock> "{0} [$($bskyPreferences.Username){1}$($PSStyle.Reset)]" -f $_.AuthorDisplay,$($PSStyle.FormatHyperLink($_.Author,$_.Url)) </ScriptBlock> </ExpressionBinding> <NewLine/> <NewLine/> <ExpressionBinding> <ScriptBlock> if ($_.IsRepost) { $fg = $bskyPreferences.IsRepost } else { $fg = $PSStyle.Foreground.White } "{0}{1}{2}" -f $fg,($PSStyle.FormatHyperLink($_.Text,$_.url)),$PSStyle.Reset </ScriptBlock> </ExpressionBinding> <NewLine/> <ExpressionBinding> <ScriptBlock> <!-- highlight liked values--> $_ | Format-Table -property Date, @{Name='Liked';Expression={ if ($_.Liked -ge 1000) { "$($bskyPreferences.LikedHighest)$($_.liked)`e[0m" } elseif ($_.liked -ge 500) { "$($bskyPreferences.LikedHigh)$($_.liked)`e[0m" } elseif ($_.liked -ge 100) { "$($bskyPreferences.LikedMedium)$($_.liked)`e[0m" } elseif ($_.liked -ge 10) { "$($bskyPreferences.LikedLow)$($_.liked)`e[0m" } else { $_.Liked } }}, Replied,Reposted,Quoted | Out-Default </ScriptBlock> </ExpressionBinding> </CustomItem> </CustomEntry> </CustomEntries> </CustomControl> </View> <View> <!--Created 01/09/2025 13:19:37 by PROSPERO\Jeff--> <Name>liked</Name> <ViewSelectedBy> <TypeName>PSBlueskyFeedItem</TypeName> </ViewSelectedBy> <TableControl> <!--Delete the AutoSize node if you want to use the defined widths.--> <AutoSize /> <TableHeaders> <TableColumnHeader> <Label>Liked</Label> <Width>8</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Date</Label> <Width>23</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Author</Label> <Width>14</Width> <Alignment>left</Alignment> </TableColumnHeader> <TableColumnHeader> <Label>Text</Label> <Width>58</Width> <Alignment>left</Alignment> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <wrap/> <TableColumnItems> <TableColumnItem> <ScriptBlock> if ($_.Liked -ge 1000) { "$($bskyPreferences.LikedHighest)$($_.liked)`e[0m" } elseif ($_.liked -ge 500) { "$($bskyPreferences.LikedHigh)$($_.liked)`e[0m" } elseif ($_.liked -ge 100) { "$($bskyPreferences.LikedMedium)$($_.liked)`e[0m" } elseif ($_.liked -ge 10) { "$($bskyPreferences.LikedLow)$($_.liked)`e[0m" } else { $_.Liked } </ScriptBlock> </TableColumnItem> <TableColumnItem> <PropertyName>Date</PropertyName> </TableColumnItem> <TableColumnItem> <ScriptBlock> "{0} [$($bskyPreferences.Username){1}$($PSStyle.Reset)]" -f $_.AuthorDisplay,$($PSStyle.FormatHyperLink($_.Author,$_.Url)) </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> "{0} {1}{2}" -f ($bskyPreferences.Message),($PSStyle.FormatHyperLink($_.Text,$_.url)),$PSStyle.Reset </ScriptBlock> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |