Python command line for property injection.
Project description
detokenizer
detokenizer of configuration files. Inject properties in source code before deployment.
Usage
This parameters are positional parameters.
| Parameters | Description |
|---|---|
| source | source file, all tokens in this file will be replaced with properties |
| target | target file, output after the replacement |
| config | config files, this fils is a yaml file defining the delimiters for the token |
| properties | properties file, this file contains the dictionary of properties which shall be injected into the source file |
the following command run the tool on the test data contained in this repo:
python3 -m detokenizer \
./test/data/source_folder/config.properties.php \
./build/config.php \
./test/data/config.yaml \
./test/data/default.properties
Example
Source file:
<?php
ini_set('memory_limit', '${packaging.memory_limit}');
$ENVIRONMENT_NAME = '${packaging.environment_name}';
#region URL
$site_URL = '${packaging.site_URL}';
#endregion
...
Properties file:
packaging.memory_limit=1024
packaging.environment_name=default
packaging.site_URL=
packaging.host=193.168.1.12
packaging.port=3000
packaging.db=db_ms_12
...
Produced target:
<?php
ini_set('memory_limit', '1024');
$ENVIRONMENT_NAME = 'default';
#region URL
$site_URL = '';
#endregion
...
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file detokenizer-1.0.0rc8.tar.gz.
File metadata
- Download URL: detokenizer-1.0.0rc8.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5168566a2120465c533495b0e2b583c3dbd3c7c01b23469eea714c62871632d6
|
|
| MD5 |
2e5e31ca561b100adebe91f80f077c68
|
|
| BLAKE2b-256 |
d2105ae81f0a394e9ae2fb1626fccf65bf5beb18fd0fa4b753bfefd188f609c7
|
File details
Details for the file detokenizer-1.0.0rc8-py3-none-any.whl.
File metadata
- Download URL: detokenizer-1.0.0rc8-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5cd27a45654055f27c77ac1b22e2afe3b04f7da01c072b404194f9f55611354
|
|
| MD5 |
16e869ec2544f93cf1eed8553aa822c8
|
|
| BLAKE2b-256 |
df98484eeee35699072066a92139d17c34bbe1720e5d3b2d7b355841cf7e5816
|