Skip to content

Commit f7c4532

Browse files
author
James Brundage
committed
docs: README content ( Fixes #1 )
2 parents 241f7fb + 40b2796 commit f7c4532

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

docs/Get-WebSocket.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,20 @@ websocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.f
3030
Foreach-Object {
3131
$in = $_
3232
if ($in.commit.record.text -match '[\p{IsHighSurrogates}\p{IsLowSurrogates}]+') {
33-
$matches.0
33+
Write-Host $matches.0 -NoNewline
3434
}
3535
}
3636
```
37+
> EXAMPLE 4
38+
39+
$emojiPattern = '[\p{IsHighSurrogates}\p{IsLowSurrogates}\p{IsVariationSelectors}\p{IsCombiningHalfMarks}]+)'
40+
websocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Tail |
41+
Foreach-Object {
42+
$in = $_
43+
if ($in.commit.record.text -match "(?>(?:$emojiPattern|\#\w+)"") {
44+
Write-Host $matches.0 -NoNewline
45+
}
46+
}
3747

3848
---
3949

@@ -110,11 +120,11 @@ The Scriptblock to run when the WebSocket job produces a warning.
110120
|`[ScriptBlock]`|false |named |false |
111121

112122
#### **Watch**
113-
If set, will tail the output of the WebSocket job, outputting results continuously instead of outputting a websocket job.
123+
If set, will watch the output of the WebSocket job, outputting results continuously instead of outputting a websocket job.
114124

115-
|Type |Required|Position|PipelineInput|
116-
|----------|--------|--------|-------------|
117-
|`[Switch]`|false |named |false |
125+
|Type |Required|Position|PipelineInput|Aliases|
126+
|----------|--------|--------|-------------|-------|
127+
|`[Switch]`|false |named |false |Tail |
118128

119129
#### **ConnectionTimeout**
120130
The maximum time to wait for a connection to be established.

docs/_data/Help/Get-WebSocket.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343
{
4444
"Title": "EXAMPLE 3",
4545
"Markdown": "",
46-
"Code": "websocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Tail |\n Foreach-Object {\n $in = $_\n if ($in.commit.record.text -match '[\\p{IsHighSurrogates}\\p{IsLowSurrogates}]+') {\n $matches.0 \n }\n }"
46+
"Code": "websocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Tail |\n Foreach-Object {\n $in = $_\n if ($in.commit.record.text -match '[\\p{IsHighSurrogates}\\p{IsLowSurrogates}]+') {\n Write-Host $matches.0 -NoNewline\n }\n }"
47+
},
48+
{
49+
"Title": "EXAMPLE 4",
50+
"Markdown": "",
51+
"Code": "$emojiPattern = '[\\p{IsHighSurrogates}\\p{IsLowSurrogates}\\p{IsVariationSelectors}\\p{IsCombiningHalfMarks}]+)'\nwebsocket jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Tail |\n Foreach-Object {\n $in = $_\n if ($in.commit.record.text -match \"(?>(?:$emojiPattern|\\#\\w+)\"\") {\n Write-Host $matches.0 -NoNewline\n }\n }"
4752
}
4853
]
4954
}

0 commit comments

Comments
 (0)