Creating windows auto install scripts from YAML config files
Project description
Creating auto install scripts from YAML config files
Features
- Pydantic-like Schema validation: the YAML schema has precise syntax and the build pipeline will yield warnings or stop if your file has errors in it
- A set of CLIs to interact with config files:
yamlrun
shows the commandsyamlrun script
is the script building subcommandyamlrun upload
is the script temp hosting subcommandyamlrun pack
locates asetup.yml
file within the current directory and runs all the commands.
An explanation
Running the command
yamlrun ?
Or equivalently yamlrun explain
will output this explanation in the terminal:
The setup file
The YAML setup file (which can also be JSON), is a way for you to describle exactly what type of package/program you want to auto-install using a single installer.
File structure
The file is structured in the following way:
<task name 1>:
description: <textual description if you wish, OPTIONAL>
items:
<item name 1>:
description: <textual description if you wish, OPTIONAL>
type: <type description, if it's a CLI, GUI, what purpose, REQUIRED>
priority: <how important it is to install it within the setup REQUIRED>
commands:
- <powershell line 1>
- <powershell line 2>
<item name 2>:
...
<item name 3>:
...
run:
# order in which the items are going to be installed
steps:
- <item name 1>
- <item name 3> # look you just swapped the order !
- <item name 2>
<task name 2>:
...
<task name 3>:
...
Script & Executable Builder
Two options:
(1) One-liner script install. This script is equivalent to:
- Building the PS1 core script
yamlrun script build <task> <path/to/setup.yml>
- Uploading the PS1 core script
yamlrun upload f <path/to/setup.ps1>
- The previous step should give you an URL of the kind http://ix.io/
- Your resulting one liner is just:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force ; irm <url> | iex
this is the yamlrun script BOL
or yamlrun script build-one-liner
command.
(2) Doing any of the steps above on its own.
Sample setup file
You can peek at the contents of this setup.yml file.
The resulting script from calling yamlrun script build
is the setup.ps1 file.
Finally, calling yamlrun setup render <name>
will generate a markdown formatted version of your setup file like setup.md
Installation
Just pip install
it if you have it, but an executable is underway 😎
pip install yaml-scripts
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yaml_scripts-0.1.1.post1.tar.gz
.
File metadata
- Download URL: yaml_scripts-0.1.1.post1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.13 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ed8c9c07331bf55ebf91f04687cdd92b513908a77ab36f52b20f6b44f8bb27 |
|
MD5 | 5b792d4ff8e3cbb1ee91e5d616be6d69 |
|
BLAKE2b-256 | 1195a9fe1cd869a29a021bca83ba1250eb440e6f9c14525b55566d1f16044a21 |
File details
Details for the file yaml_scripts-0.1.1.post1-py3-none-any.whl
.
File metadata
- Download URL: yaml_scripts-0.1.1.post1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.13 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8546e31ab43d3215e4823abd991c33d831c88de20fa7c94039e16b2156741df0 |
|
MD5 | babac521bf81188e206524b3795e4ad3 |
|
BLAKE2b-256 | 4ae23a68f553dbd52c982377071e799223d304a419674b01b77245cf43606038 |