File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -113,3 +113,39 @@ websocket wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.
113113 $_.commit.record.embed.external.uri
114114 }
115115~~~
116+ #### Get-WebSocket Example 8
117+
118+ ~~~ powershell
119+ # BlueSky, but just the hashtags
120+ websocket wss://jetstream2.us-west.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -WatchFor @{
121+ {$webSocketoutput.commit.record.text -match "\#\w+"}={
122+ $matches.0
123+ }
124+ }
125+ ~~~
126+ #### Get-WebSocket Example 9
127+
128+ ~~~ powershell
129+ # BlueSky, but just the hashtags (as links)
130+ websocket wss://jetstream2.us-west.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -WatchFor @{
131+ {$webSocketoutput.commit.record.text -match "\#\w+"}={
132+ if ($psStyle.FormatHyperlink) {
133+ $psStyle.FormatHyperlink($matches.0, "https://bsky.app/search?q=$([Web.HttpUtility]::UrlEncode($matches.0))")
134+ } else {
135+ $matches.0
136+ }
137+ }
138+ }
139+ ~~~
140+ #### Get-WebSocket Example 10
141+
142+ ~~~ powershell
143+ websocket wss://jetstream2.us-west.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -WatchFor @{
144+ {$args.commit.record.text -match "\#\w+"}={
145+ $matches.0
146+ }
147+ {$args.commit.record.text -match '[\p{IsHighSurrogates}\p{IsLowSurrogates}]+'}={
148+ $matches.0
149+ }
150+ }
151+ ~~~
You can’t perform that action at this time.
0 commit comments