Skip to main content

A Python package for easier reuseability of the System Template Regolith filter for Minecraft Bedrock Edition

Project description

A Python package that powers the System Template Regolith Filter and provides a command-line tool for creating projects based on templates defined using the System Template syntax.

Installation

pip install regolith-system-template

Command-Line Tool

This package adds the system-template command-line tool.

Before using the tool, set the REGOLITH_SYSTEM_TEMPLATE environment variable to specify the directory where your templates are stored. Templates should be organized into subfolders within this directory, using the same format as the Regolith filter.

You can verify that system-template is set up correctly by running the following command:

system-template list

This will list all available templates in the REGOLITH_SYSTEM_TEMPLATE directory.

To use a template, run:

system-template run <template-name>

This will create a new system based on the template named <template-name>.

Flags

  • --systems-path - Instead of using the REGOLITH_SYSTEM_TEMPLATE environment variable, specify the path to the template directory with this flag.

  • --scope-path - Provide the path to a file containing the scope for template execution. This is useful when executing a template within a Regolith project. In that case, use this flag to specify the project’s global Regolith scope.

  • --scope - Define the scope in JSON format. When using System Template as a Regolith filter, it uses the scope defined in config.json. This flag allows you to provide a replacement for that scope when running the command-line tool.

  • --allow-non-empty - By default, the tool does not run in non-empty directories. Use this flag to override this behavior.

  • --replacements - Provide a JSON object with key-value pairs to replace text in the template files. This corresponds to the replacements setting in config.json when using System Template as a Regolith filter.

For additional help, use the --help flag.

Unlike the Regolith filter, the command-line tool is not restricted to exporting only to the RP/, BP/, and data/ directories.

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

regolith_system_template-1.2.0.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

regolith_system_template-1.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file regolith_system_template-1.2.0.tar.gz.

File metadata

File hashes

Hashes for regolith_system_template-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1203a98f0bac6c8ddd8ceef0344d2c70a4445377a46b4749ad996f0c130fedb0
MD5 63491dc7c9da97446aedf2f94ef11278
BLAKE2b-256 2e70f82535e6059185e6c22d0a38d8f5ff8f2ecfe15d84f5d5c1a835879a7f23

See more details on using hashes here.

File details

Details for the file regolith_system_template-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for regolith_system_template-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5f11328163b4054fa737485fa21aac77a5f35ca87e51cb6af026993ba0b4d56
MD5 65a6bf53fc1e0e150c95247bdb49a428
BLAKE2b-256 f494947c386f2ff8905cc2308db3b318571d714d3e3a15e14a5c3f2a03c8f75b

See more details on using hashes here.

Supported by

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