Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ subs Public

A simple utility that substitutes variables in templates.

Notifications You must be signed in to change notification settings

gilbertw1/subs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subs

A utility that substitutes variables in templates.

Installation

Build

cargo build --release

Run

./target/release/subs

Example

# Read mappings from 'mappings.txt'
# Use it to substitue variables in 'test.txt'
# Write result to stdout.
./subs --mappings-file mappings.txt test.txt -

Usage

subs 0.1.0
Bryan G. <[email protected]>
A utility that can be used to substitute variables in templates.

USAGE:
    subs [OPTIONS] [ARGS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -e, --end-delimiter <DELIMITER>      Delimiter used to delineate the end of a substitution. [default: }}]
        --mappings <MAPPINGS>            Replacement mappings definitions [env: SUBS_MAPPINGS=]
        --mappings-file <FILE>           File containing replacement mappings definitions. Overrides mappings argument.
                                         Use '-' for stdin.
    -s, --start-delimiter <DELIMITER>    Delimiter used to delineate the start of a substitution. [default: {{]

ARGS:
    <IN-FILE>     Template file to be used. Use '-' for stdin.
    <OUT-FILE>    File to write resulting template substitution out to. Use '-' for stdout.

About

A simple utility that substitutes variables in templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published