Skip to main content

Create directories from skeletons, with templating support.

Project description

skelate

A utility to create directory from skeletons, with templating support.

This is a tool inspired by the functionality provided by ansible-galaxy init.

Requirements

  • python 3.8+

Installing

Install and update using pip:

pip install -U skelate

Alternatively, you can package and run skelate in a docker container:

make image

Usage

Basic usage is to treat skelate like cp -r, with expansion of j2 files.

skelate this/dir that/dir

If this/dir contains no files with a j2 extension, this will act exactly like cp -r.

If this/dir does contain files with a j2 extension, these will be expanded into that/dir, minus their .j2 suffix.

You can pass variables to templates in two ways:

# Read variables from a JSON file
skelate --vars path/to/vars.json this/dir that/dir

# Read variables from command line
skelate --extra-vars "key=value" \
  --extra-vars 'key={"key": ["value", "value"]}' \
  this/dir that/dir

For more options:

skelate --help

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skelate-0.0.2.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

skelate-0.0.2-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page