Skip to content

Commit

Permalink
feat: Get-WebSocket ( Fixes #2 )
Browse files Browse the repository at this point in the history
Adding Examples and aliasing -Watch to -Tail
  • Loading branch information
James Brundage committed Nov 27, 2024
1 parent 0be8a26 commit eac4372
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Commands/Get-WebSocket.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ function Get-WebSocket {
Foreach-Object {
$in = $_
if ($in.commit.record.text -match '[\p{IsHighSurrogates}\p{IsLowSurrogates}]+') {
$matches.0
Write-Host $matches.0 -NoNewline
}
}
.EXAMPLE
$emojiPattern = '[\p{IsHighSurrogates}\p{IsLowSurrogates}\p{IsVariationSelectors}\p{IsCombiningHalfMarks}]+)'
websocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Tail |
Foreach-Object {
$in = $_
if ($in.commit.record.text -match "(?>(?:$emojiPattern|\#\w+)"") {
Write-Host $matches.0 -NoNewline
}
}
#>
Expand Down Expand Up @@ -63,7 +72,8 @@ function Get-WebSocket {
[ScriptBlock]
$OnWarning,

# If set, will tail the output of the WebSocket job, outputting results continuously instead of outputting a websocket job.
# If set, will watch the output of the WebSocket job, outputting results continuously instead of outputting a websocket job.
[Alias('Tail')]
[switch]
$Watch,

Expand Down

0 comments on commit eac4372

Please sign in to comment.