Metadata-Version: 2.1
Name: ptrender
Version: 0.0.2
Summary: Conveniences for rendering text files from pyratemp templates and json or yaml var files
Home-page: https://github.com/andydecleyre/ptrender
License: WTFPL
Keywords: pyratemp,template,render,renderer
Author: Andy Kluger
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Dist: plumbum
Requires-Dist: pyratemp
Requires-Dist: flit ; extra == "dev"
Requires-Dist: ipython ; extra == "dev"
Requires-Dist: strictyaml ; extra == "yaml"
Provides-Extra: dev
Provides-Extra: yaml

ptrender & vwrite
=================

Conveniences for rendering text files from pyratemp templates and json or yaml var files
----------------------------------------------------------------------------------------

See pyratemp__ for template syntax.

__ https://www.simple-is-better.org/template/pyratemp.html

ptrender
--------

::

    ptrender 0.0.2
    
    Use json or yaml var_files to render template_file to an adjacent
    file with the same name but the extension stripped
    
    Usage:
        ptrender [SWITCHES] template_file var_files...
    
    Meta-switches:
        -h, --help         Prints this help message and quits
        --help-all         Prints help messages of all sub-commands and quits
        -v, --version      Prints the program's version and quits
    
    Switches:
        -f, --force        Overwrite any existing destination file
    

vwrite
------

::

    vwrite 0.0.2
    
    Use json or yaml vars files to render each template file found recursively
    under the working folder, to an adjacent file with the same name but the
    extension stripped, overriding any vars in ./vars.json in the following
    order:
    
        <root_path>/vars.json,
        <root_path>/vars.yml,
        <root_path>/vars.yaml,
        <template.parent>/vars.json,
        <template.parent>/vars.yml,
        <template.parent>/vars.yaml
    
    Later entries override earlier ones.
    
    Usage:
        vwrite [SWITCHES] [root_path=<CWD>]
    
    Meta-switches:
        -h, --help                        Prints this help message and quits
        --help-all                        Prints help messages of all sub-commands and quits
        -v, --version                     Prints the program's version and quits
    
    Switches:
        -f, --force                       Overwrite any existing destination file
        -n, --vars-name VALUE:str         Filename (excluding extension) for each vars file; the default is vars
        -t, --template-ext VALUE:str      Filename extension for templates; the default is t
    

