Metadata-Version: 2.1
Name: coi
Version: 0.0.2
Summary: See output/input status of all sub-folders
Home-page: https://github.com/nosarthur/coi
Author: Dong Zhou
Author-email: zhou.dong@gmail.com
License: MIT
Description: # coi: manager for shell script templates
        
        I often improvise bash scripts and later regret not saving them.
        This tool manages shell script templates for reuse.
        
        1. run shell command templates with substitutions
        2. keep track of commands run in each folder for later reference
        1. store common templates
        
        For example, the variable parts of the following batch execution may be
        
        1. folder name pattern: `*_5/`
        2. command: `$ABIN/generate.py`
        
        ```bash
        for dname in *_5/; do python3 $ABIN/generate.py $dname${dname%/}-out.cms; done
        ```
        
        ## commands
        
        - `templates` sub command
            - `coi templates add <name>`
            - `coi templates add <name> -t <template-file>`
            - `coi templates edit <name>`
            - `coi templates ls`
            - `coi templates rm <name>`
            - `coi templates set <name>`
            - `coi templates show <name>`
        
        ## example
        
        Suppose the folder structure
        ```
        jobs-folder
        ├── sub1
        │   ├── 1.input
        │   ├── 1.output
        │   └── 2.input
        ├── sub2
        │   ├── 1.input
        │   └── 2.input
        ├── sub3
        │   ├── 1.input
        │   ├── 1.output
        │   ├── 2.input
        │   └── 2.output
        └── sub4
            ├── 1.input
            └── 1.output
        ```
        
        ```bash
        coi -c "wc -l" \
            -o "ll *.output" \
            -i "ll *.input" \
            jobs-folder
        ```
        
        ```bash
        sub1 (1 / 2)
        sub2 (0 / 2)
        sub3 (2 / 2)
        sub4 (1 / 1)
        ```
        
        ## customization
        
        Python [template strings](https://docs.python.org/3/library/string.html#template-strings ])
        
        ## design
        
        Essentially this is a tool for shell script templating, with up to 3 substitutions.
        
        - templates are saved in
          - system folder: default
          - XDG/coi/templates/: user defined
          - the user defined templates shadow default ones if name clashes
        - when a command is run once in `path`, save `path/.coi/1.json` where the keys
          are c, o, i, and template name
        
        ### integration with fzf
        
        If json files exists in a path, we can let the user pick with fzf
        
Keywords: bash
Platform: linux
Platform: osx
Platform: win32
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: ~=3.6
Description-Content-Type: text/markdown
