ps-minifier
A very basic minifier for PowerShell scripts.
Currently, a semicolon (;) is required at the end of each line in the script it is given.
NOTE: This minifier is currently not very complex, and (while it works with programs I have tested it on) may not output functioning code for all programs it is given.
Installation
$ pip install ps-minifier
Usage
To display the help menu:
$ psminifier -h
usage: psminifier [-h] [-f FILE] [-o OUT_FILE]
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE path to file to minify
-o OUT_FILE, --out-file OUT_FILE
path to save the result
Pass the path to the file:
$ psminifier -f FILE_PATH
Pass the path to save the result to:
$ psminifier -o OUTPUT_PATH
If psminifier is run without -f it will prompt the user to enter code via the standard input.
If it is run without -o it will output the result to the standard output.
The psminifier module can be imported from python script as follows.
from ps_minifier.psminifier import minify
script = "[Some Powershell Scripts]"
minified_script = minify(script)
print(minified_script)
Release files for ps-minifier 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ps-minifier-0.2.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ps_minifier-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / ps-minifier-0.2.0.tar.gz
| Download URL | ps-minifier-0.2.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19f817ac0baa34dfd48fb36aa2921d572b33d8559962077908e42399b536a52d
|
|
BLAKE2b-256 checksum How to use checksums |
7d41f81daa3cff59ffc22beb14135d0e5545c6e468fbc1ea05a903f3e2554350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / ps_minifier-0.2.0-py3-none-any.whl
| Download URL | ps_minifier-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
550c4fe583b12087eba4aa00db9f64cc8d47a0bb4541309d7553c618a1853fd7
|
|
BLAKE2b-256 checksum How to use checksums |
e13ab16d195c6de2c814dd6a7f0c03e14602a316e0ab680e0488619857e213aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|