Metadata-Version: 2.1
Name: coge
Version: 0.0.4
Summary: this is a description
Home-page: https://github.com/zk4/cg
Author: zk
Author-email: liuzq7@gmail.com
License: BSD
Download-URL: https://github.com/zk4/cg/archive/master.zip
Keywords: best practice for python project
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Requires-Python: >3.0.0
Description-Content-Type: text/markdown
Requires-Dist: setuptools (==40.6.3)
Requires-Dist: pytest (==5.2.1)
Requires-Dist: PyYAML (==5.3.1)

# cg

Simple yet powerful code generator.
Make use of your shell as possiable as cg can.

Pity, the name cg is taken by others. use `coge` in cmdline. maybe you should `alias cg=cgr`

Compare to hygen, yo.
- yo is way too slow and complicated.
- hygen pollutes all template files, and only support ejs.

**What I only need:**
1. [x] template is runable as normal prj. No more \$placehold\$ stuff.
2. [x] instinct command follows the folder path.
4. [x] quick project to template and vice versa.
3. [x] respect .gitignore.
4. auto complete in command line.
5. prompt available.

# install
```
make install
```

# usage
```
export CG_TMPLS="<your_template_folder>"
```

## 1
``` bash
cgr js react oldkey:newkey :newkey0 :newkey1 @:destname 
```
What cg does:

- copy $CG_TMPLS/js/react to $PWD/destname
- change all names from oldkey to newkey,  from  CG_ARG__0 to newkey0 ,from  CG_ARG__1 to newkey1

## 2
``` bash
cg js react
```
What cg does:
- Just copy $CG_TMPLS/js/react to $PWD/app




# help
```
usage: cg [-h] [-a ARG_PREFIX] [-l] [-r] [-d DEPTH] [o [o ...]]

positional arguments:
  o                     folder or newkey:oldkey (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -a ARG_PREFIX, --arg_prefix ARG_PREFIX
                        ex: CG_ARG__ (default: CG_ARG__)
  -l, --list            list folders (default: False)
  -r, --link_tplt       link cwd template to CG_TMPLS (default: False)
  -d DEPTH, --depth DEPTH
                        list depth (default: 3)

```

