psytricks 2.2.0a10__tar.gz → 2.2.0a19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of psytricks might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: psytricks
3
- Version: 2.2.0a10
3
+ Version: 2.2.0a19
4
4
  Summary: PowerShell Python Citrix Tricks.
5
5
  License-Expression: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -24,10 +24,10 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  # PSytricks
26
26
 
27
- ![PyPI](https://img.shields.io/pypi/v/psytricks)
27
+ [![PyPI](https://img.shields.io/pypi/v/psytricks)](https://pypi.org/project/psytricks/)
28
28
  ![PyPI - License](https://img.shields.io/pypi/l/psytricks)
29
- ![pdoc](https://img.shields.io/badge/docs-pdoc-brightgreen.svg)
30
- ![black](https://img.shields.io/badge/code%20style-black-000000.svg)
29
+ [![pdoc](https://img.shields.io/badge/docs-pdoc-brightgreen.svg)](https://imcf.one/apidocs/psytricks)
30
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
31
31
 
32
32
  `P`ower`S`hell P`y`thon Ci`tri`x Tri`cks` - pun intended.
33
33
 
@@ -51,9 +51,9 @@ PSyTricks ships with two options for the PowerShell layer:
51
51
  obviously this requires the code to be running as a service in an appropriate
52
52
  permission context.
53
53
 
54
- NOTE: this `RESTful` claim is actually not entirely true. Or basically not at
55
- all, it would be better called an `HTTP-JSON-RPC-API`. We'll still be using the
56
- term `REST` for it as the functionality of this package basically serves a very
54
+ NOTE: this `RESTful` claim isn't fully true. Or actually not at all, it would be
55
+ better called an `HTTP-JSON-RPC-API`. For now, we'll still be using the term
56
+ `REST` for it as the functionality of this package basically serves a very
57
57
  similar purpose to what people think of when they are coming across this label.
58
58
  Apologies, [Roy T. Fielding][www_rtf].
59
59
 
@@ -129,7 +129,9 @@ tried it and how it went!
129
129
 
130
130
  To go with **WinSW** simply download the bundled version provided with each
131
131
  [PSyTricks release][www_releases]. Just look for the `.zip` asset having `REST`
132
- and `WinSW` in its name.
132
+ and `WinSW` in its name, matching your .NET version.
133
+
134
+ #### 🔧 Configuration
133
135
 
134
136
  Unzip the downloaded file to the desired target location, e.g.
135
137
  `%PROGRAMDATA%\PSyTricks`, then copy / rename `restricks-server.example.xml` to
@@ -140,11 +142,28 @@ and make sure to update the hostname passed via the `-AdminAddress` parameter in
140
142
  the `<startarguments>` section. It needs to point to your Citrix Delivery
141
143
  Controller, just in case that's not obvious.
142
144
 
143
- Next step is to install and start the service:
145
+ #### 🛑⚠️🛑 Enable execution
146
+
147
+ Depending on the security policies in place on your system, the service
148
+ components need to be explicitly unblocked before the service can be started. To
149
+ do this, run the following commands:
144
150
 
145
151
  ```PowerShell
146
- cd C:\ProgramData\PSyTricks
147
- restricks-server.exe install
152
+ cd C:\ProgramData\PSyTricks # or wherever you're installing to
153
+ Unblock-File .\psytricks-lib.ps1
154
+ Unblock-File .\restricks-server.ps1
155
+ Unblock-File .\restricks-server.exe
156
+ ```
157
+
158
+ 💡 Those steps also need to be performed when **upgrading** the service, which
159
+ is done by replacing exactly the files listed above.
160
+
161
+ #### ☑️ Register and 🏃🏼‍♀️‍➡️ run it
162
+
163
+ The final step is to install and start the service:
164
+
165
+ ```PowerShell
166
+ .\restricks-server.exe install
148
167
  Start-Service RESTricksServer
149
168
  ```
150
169
 
@@ -163,7 +182,9 @@ Tada! That's it, the service is now ready to take HTTP requests (from
163
182
 
164
183
  Please be aware that the REST interface doesn't do **any authentication** on
165
184
  purpose, meaning everything / everyone that can access it will be able to run
166
- all requests! We're using it in combination with an SSH tunnel but essentially
185
+ all requests!
186
+
187
+ We're using it in combination with an 🔐🌐 **SSH tunnel** but essentially
167
188
  anything that controls who / what can access the service will do the job.
168
189
 
169
190
  ## 🎪 What does it provide?
@@ -1,9 +1,9 @@
1
1
  # PSytricks
2
2
 
3
- ![PyPI](https://img.shields.io/pypi/v/psytricks)
3
+ [![PyPI](https://img.shields.io/pypi/v/psytricks)](https://pypi.org/project/psytricks/)
4
4
  ![PyPI - License](https://img.shields.io/pypi/l/psytricks)
5
- ![pdoc](https://img.shields.io/badge/docs-pdoc-brightgreen.svg)
6
- ![black](https://img.shields.io/badge/code%20style-black-000000.svg)
5
+ [![pdoc](https://img.shields.io/badge/docs-pdoc-brightgreen.svg)](https://imcf.one/apidocs/psytricks)
6
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
7
7
 
8
8
  `P`ower`S`hell P`y`thon Ci`tri`x Tri`cks` - pun intended.
9
9
 
@@ -27,9 +27,9 @@ PSyTricks ships with two options for the PowerShell layer:
27
27
  obviously this requires the code to be running as a service in an appropriate
28
28
  permission context.
29
29
 
30
- NOTE: this `RESTful` claim is actually not entirely true. Or basically not at
31
- all, it would be better called an `HTTP-JSON-RPC-API`. We'll still be using the
32
- term `REST` for it as the functionality of this package basically serves a very
30
+ NOTE: this `RESTful` claim isn't fully true. Or actually not at all, it would be
31
+ better called an `HTTP-JSON-RPC-API`. For now, we'll still be using the term
32
+ `REST` for it as the functionality of this package basically serves a very
33
33
  similar purpose to what people think of when they are coming across this label.
34
34
  Apologies, [Roy T. Fielding][www_rtf].
35
35
 
@@ -105,7 +105,9 @@ tried it and how it went!
105
105
 
106
106
  To go with **WinSW** simply download the bundled version provided with each
107
107
  [PSyTricks release][www_releases]. Just look for the `.zip` asset having `REST`
108
- and `WinSW` in its name.
108
+ and `WinSW` in its name, matching your .NET version.
109
+
110
+ #### 🔧 Configuration
109
111
 
110
112
  Unzip the downloaded file to the desired target location, e.g.
111
113
  `%PROGRAMDATA%\PSyTricks`, then copy / rename `restricks-server.example.xml` to
@@ -116,11 +118,28 @@ and make sure to update the hostname passed via the `-AdminAddress` parameter in
116
118
  the `<startarguments>` section. It needs to point to your Citrix Delivery
117
119
  Controller, just in case that's not obvious.
118
120
 
119
- Next step is to install and start the service:
121
+ #### 🛑⚠️🛑 Enable execution
122
+
123
+ Depending on the security policies in place on your system, the service
124
+ components need to be explicitly unblocked before the service can be started. To
125
+ do this, run the following commands:
120
126
 
121
127
  ```PowerShell
122
- cd C:\ProgramData\PSyTricks
123
- restricks-server.exe install
128
+ cd C:\ProgramData\PSyTricks # or wherever you're installing to
129
+ Unblock-File .\psytricks-lib.ps1
130
+ Unblock-File .\restricks-server.ps1
131
+ Unblock-File .\restricks-server.exe
132
+ ```
133
+
134
+ 💡 Those steps also need to be performed when **upgrading** the service, which
135
+ is done by replacing exactly the files listed above.
136
+
137
+ #### ☑️ Register and 🏃🏼‍♀️‍➡️ run it
138
+
139
+ The final step is to install and start the service:
140
+
141
+ ```PowerShell
142
+ .\restricks-server.exe install
124
143
  Start-Service RESTricksServer
125
144
  ```
126
145
 
@@ -139,7 +158,9 @@ Tada! That's it, the service is now ready to take HTTP requests (from
139
158
 
140
159
  Please be aware that the REST interface doesn't do **any authentication** on
141
160
  purpose, meaning everything / everyone that can access it will be able to run
142
- all requests! We're using it in combination with an SSH tunnel but essentially
161
+ all requests!
162
+
163
+ We're using it in combination with an 🔐🌐 **SSH tunnel** but essentially
143
164
  anything that controls who / what can access the service will do the job.
144
165
 
145
166
  ## 🎪 What does it provide?
@@ -7,7 +7,7 @@ authors = [
7
7
  license = "GPL-3.0-or-later"
8
8
  readme = "README.md"
9
9
  dynamic = []
10
- version = "2.2.0-a.10"
10
+ version = "2.2.0-a.19"
11
11
 
12
12
  [tool.poetry]
13
13
  documentation = "https://imcf.one/apidocs/psytricks/psytricks.html"
@@ -3,7 +3,7 @@
3
3
  .. include:: ../../CHANGELOG.md
4
4
  """
5
5
 
6
- __version__ = "2.2.0-a.10"
6
+ __version__ = "2.2.0-a.19"
7
7
 
8
8
  # style exceptions for pdoc-include-only docstrings:
9
9
  # ruff: noqa: D400 (missing-trailing-period)
@@ -5,7 +5,7 @@ Collection of functions and other definitions to be sourced by other scripts.
5
5
  #>
6
6
 
7
7
  # the version variable will be filled by poetry at build time:
8
- $Version = "2.2.0-a.10"
8
+ $Version = "2.2.0-a.19"
9
9
 
10
10
 
11
11
  #region properties-selectors
@@ -93,7 +93,7 @@ if ($Shutdown) {
93
93
  Stop-Process -Name "restricks-server" -ErrorAction SilentlyContinue
94
94
  }
95
95
  } catch {
96
- Write-Host "Issue shutting down: $_"
96
+ Write-Host "[$(Format-Date)] Issue shutting down: $_"
97
97
  } finally {
98
98
  exit
99
99
  }
@@ -474,6 +474,7 @@ function Start-ListenerBlocking {
474
474
 
475
475
  function Start-ListenerLoop {
476
476
  Write-Host "====================================================" @Blue
477
+ Write-Host "$(Format-Date)" @Blue
477
478
  Write-Host "Starting: $ScriptPath" @Blue
478
479
  Write-Host "PSyTricksVersion: $Version" @Blue
479
480
  Write-Host "Citrix 'AdminAddress': $AdminAddress" @Blue
@@ -495,7 +496,7 @@ function Start-ListenerLoop {
495
496
  Write-Host "====================================================" @Blue
496
497
  return
497
498
  }
498
- Write-Host "No shutdown file [$StopMarker] present." @Blue
499
+ Write-Host "[$(Format-Date)] No shutdown file [$StopMarker] present." @Blue
499
500
  Write-Host "Re-starting in 5s, press Ctrl+C to abort..." @Blue
500
501
  Start-Sleep -Seconds 5
501
502
  Write-Host "Wait-time elapsed, re-starting the listener..."
@@ -516,7 +517,7 @@ if ($LogFile -eq "") {
516
517
  } catch {
517
518
  throw "Unable to open log file for writing: [$LogFile]"
518
519
  }
519
- Write-Host "[$ScriptName] logs will go to [$LogFile]."
520
+ Write-Host "[$ScriptName] [$(Format-Date)] logs will go to [$LogFile]."
520
521
  # 'Write-Host' is writing to the 'Information' stream (which is #6), so we
521
522
  # need to redirect that one to the log file:
522
523
  Start-ListenerLoop 6>&1 | Out-File $LogFile -Encoding "utf8"
@@ -9,8 +9,8 @@ The dicts defined here can be used to map the numerical values back to their
9
9
  descriptive names. The mapped names are corresponding to the ones described in
10
10
  the official Citrix CVAD 2203 developer docs (all transformed to lowercase):
11
11
 
12
- https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops-sdk/2203/
13
- https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops-sdk/2507/
12
+ * https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops-sdk/2203/
13
+ * https://developer-docs.citrix.com/en-us/citrix-virtual-apps-desktops-sdk/2507/
14
14
  """
15
15
 
16
16
  #######################################################################################
File without changes