psytricks 2.2.0a18__tar.gz → 2.2.0a20__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.0a18
3
+ Version: 2.2.0a20
4
4
  Summary: PowerShell Python Citrix Tricks.
5
5
  License-Expression: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -98,7 +98,7 @@ Controller` or `XenDesktop` installation media and install it as usual:
98
98
 
99
99
  * `Broker_PowerShellSnapIn_x64.msi`
100
100
 
101
- ### Installing the 🐍 package
101
+ ### Installing the 🐍 Python package
102
102
 
103
103
  In case you're planning to use `psytricks` via the subprocess approach
104
104
  (discouraged but less components to set up), you will have to install the
@@ -119,10 +119,15 @@ commands provided by the PowerShell snap-in could be used directly.
119
119
 
120
120
  ### Setting up the REST service
121
121
 
122
- The easiest way for installing the REST service is to use [WinSW (Windows
123
- Service Wrapper)][www_winsw] but you may choose anything you like to launch the
124
- server process like NSSM, Scheduled Tasks 📅, homegrown dark magic 🪄🔮 or
125
- others.
122
+ 💡 When using the `ResTricksService` (recommended), only that service itself
123
+ needs to run on a Windows machine having the *Citrix Broker PowerShell Snap-In*
124
+ installed - the 🐍 Python package can then be used from any (Linux, ...) system
125
+ that is able to connect to the service!
126
+
127
+ The currently recommended way for installing the `ResTricksService` is using
128
+ [WinSW (Windows Service Wrapper)][www_winsw] but you may choose anything you
129
+ like to launch the server process like NSSM, Scheduled Tasks 📅, homegrown dark
130
+ magic 🪄🔮 or others.
126
131
 
127
132
  🧪 A more recent approach could be [Shawl][www_shawl] - let us know if you've
128
133
  tried it and how it went!
@@ -131,6 +136,8 @@ To go with **WinSW** simply download the bundled version provided with each
131
136
  [PSyTricks release][www_releases]. Just look for the `.zip` asset having `REST`
132
137
  and `WinSW` in its name, matching your .NET version.
133
138
 
139
+ #### 🔧 Configuration
140
+
134
141
  Unzip the downloaded file to the desired target location, e.g.
135
142
  `%PROGRAMDATA%\PSyTricks`, then copy / rename `restricks-server.example.xml` to
136
143
  `restricks-server.xml` and open it in an editor.
@@ -140,11 +147,30 @@ and make sure to update the hostname passed via the `-AdminAddress` parameter in
140
147
  the `<startarguments>` section. It needs to point to your Citrix Delivery
141
148
  Controller, just in case that's not obvious.
142
149
 
143
- Next step is to install and start the service:
150
+ #### 🛑⚠️🛑 Enable execution
151
+
152
+ Depending on the security policies in place on your system, the service
153
+ components need to be explicitly unblocked before the service can be started. To
154
+ do this, run the following commands:
155
+
156
+ ```PowerShell
157
+ cd C:\ProgramData\PSyTricks # or wherever you're installing to
158
+ Unblock-File .\psytricks-lib.ps1
159
+ Unblock-File .\restricks-server.ps1
160
+ Unblock-File .\restricks-server.exe
161
+ ```
162
+
163
+ 💡 Those steps also need to be performed when **upgrading** the service, which
164
+ is done by replacing exactly the files listed above. For a *TL;DR* summary on
165
+ downloading, extracting and upgrading an installation, see the
166
+ [installation / upgrade instructions](INSTALLATION.md).
167
+
168
+ #### ☑️ Register and 🏃🏼‍♀️‍➡️ run it
169
+
170
+ The final step is to install and start the service:
144
171
 
145
172
  ```PowerShell
146
- cd C:\ProgramData\PSyTricks
147
- restricks-server.exe install
173
+ .\restricks-server.exe install
148
174
  Start-Service RESTricksServer
149
175
  ```
150
176
 
@@ -163,7 +189,9 @@ Tada! That's it, the service is now ready to take HTTP requests (from
163
189
 
164
190
  Please be aware that the REST interface doesn't do **any authentication** on
165
191
  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
192
+ all requests!
193
+
194
+ We're using it in combination with an 🔐🌐 **SSH tunnel** but essentially
167
195
  anything that controls who / what can access the service will do the job.
168
196
 
169
197
  ## 🎪 What does it provide?
@@ -74,7 +74,7 @@ Controller` or `XenDesktop` installation media and install it as usual:
74
74
 
75
75
  * `Broker_PowerShellSnapIn_x64.msi`
76
76
 
77
- ### Installing the 🐍 package
77
+ ### Installing the 🐍 Python package
78
78
 
79
79
  In case you're planning to use `psytricks` via the subprocess approach
80
80
  (discouraged but less components to set up), you will have to install the
@@ -95,10 +95,15 @@ commands provided by the PowerShell snap-in could be used directly.
95
95
 
96
96
  ### Setting up the REST service
97
97
 
98
- The easiest way for installing the REST service is to use [WinSW (Windows
99
- Service Wrapper)][www_winsw] but you may choose anything you like to launch the
100
- server process like NSSM, Scheduled Tasks 📅, homegrown dark magic 🪄🔮 or
101
- others.
98
+ 💡 When using the `ResTricksService` (recommended), only that service itself
99
+ needs to run on a Windows machine having the *Citrix Broker PowerShell Snap-In*
100
+ installed - the 🐍 Python package can then be used from any (Linux, ...) system
101
+ that is able to connect to the service!
102
+
103
+ The currently recommended way for installing the `ResTricksService` is using
104
+ [WinSW (Windows Service Wrapper)][www_winsw] but you may choose anything you
105
+ like to launch the server process like NSSM, Scheduled Tasks 📅, homegrown dark
106
+ magic 🪄🔮 or others.
102
107
 
103
108
  🧪 A more recent approach could be [Shawl][www_shawl] - let us know if you've
104
109
  tried it and how it went!
@@ -107,6 +112,8 @@ To go with **WinSW** simply download the bundled version provided with each
107
112
  [PSyTricks release][www_releases]. Just look for the `.zip` asset having `REST`
108
113
  and `WinSW` in its name, matching your .NET version.
109
114
 
115
+ #### 🔧 Configuration
116
+
110
117
  Unzip the downloaded file to the desired target location, e.g.
111
118
  `%PROGRAMDATA%\PSyTricks`, then copy / rename `restricks-server.example.xml` to
112
119
  `restricks-server.xml` and open it in an editor.
@@ -116,11 +123,30 @@ and make sure to update the hostname passed via the `-AdminAddress` parameter in
116
123
  the `<startarguments>` section. It needs to point to your Citrix Delivery
117
124
  Controller, just in case that's not obvious.
118
125
 
119
- Next step is to install and start the service:
126
+ #### 🛑⚠️🛑 Enable execution
127
+
128
+ Depending on the security policies in place on your system, the service
129
+ components need to be explicitly unblocked before the service can be started. To
130
+ do this, run the following commands:
131
+
132
+ ```PowerShell
133
+ cd C:\ProgramData\PSyTricks # or wherever you're installing to
134
+ Unblock-File .\psytricks-lib.ps1
135
+ Unblock-File .\restricks-server.ps1
136
+ Unblock-File .\restricks-server.exe
137
+ ```
138
+
139
+ 💡 Those steps also need to be performed when **upgrading** the service, which
140
+ is done by replacing exactly the files listed above. For a *TL;DR* summary on
141
+ downloading, extracting and upgrading an installation, see the
142
+ [installation / upgrade instructions](INSTALLATION.md).
143
+
144
+ #### ☑️ Register and 🏃🏼‍♀️‍➡️ run it
145
+
146
+ The final step is to install and start the service:
120
147
 
121
148
  ```PowerShell
122
- cd C:\ProgramData\PSyTricks
123
- restricks-server.exe install
149
+ .\restricks-server.exe install
124
150
  Start-Service RESTricksServer
125
151
  ```
126
152
 
@@ -139,7 +165,9 @@ Tada! That's it, the service is now ready to take HTTP requests (from
139
165
 
140
166
  Please be aware that the REST interface doesn't do **any authentication** on
141
167
  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
168
+ all requests!
169
+
170
+ We're using it in combination with an 🔐🌐 **SSH tunnel** but essentially
143
171
  anything that controls who / what can access the service will do the job.
144
172
 
145
173
  ## 🎪 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.18"
10
+ version = "2.2.0-a.20"
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.18"
6
+ __version__ = "2.2.0-a.20"
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.18"
8
+ $Version = "2.2.0-a.20"
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