entangled / entangled.py

Python port of Entangled
Apache License 2.0
33 stars 7 forks source link

add `entangled new` command #31

Closed OleMussmann closed 11 months ago

OleMussmann commented 11 months ago

Start new projects from a template directly with entangled.

usage: entangled new [-h] [-a ANSWERS_FILE] [-d DATA] [-D] [-p] [-o] [-l] [-t] [template] [project_path]

Create a new entangled project from a template.

positional arguments:
  template              Template handle or URL; initialize a new project from this template (default: -)
  project_path          Initialize a new project at this path (default: -)

options:
  -h, --help            show this help message and exit
  -a ANSWERS_FILE, --answers-file ANSWERS_FILE
                        Update using this path (relative to [project_path]) to find the answers file for `copier`
                        (default: -)
  -d DATA, --data DATA  "VARIABLE1=VALUE1;VARIABLE1=VALUE2" Make VARIABLEs available as VALUEs when rendering the
                        template; make sure to use quotation marks for multiple variables/values (default: '')
  -D, --defaults        Use default answers to questions, which might be null if not specified; overwrites when combined
                        with -d! (default: False)
  -p, --pretend         Run but do not make any changes (default: False)
  -o, --overwrite       Overwrite files that already exist, without asking. (default: False)
  -l, --list-templates  List all official templates and exit (default: False)
  -t, --trust           Allow templates with unsafe features (Jinja extensions, migrations, tasks); "True" for
                        officially supported templates (default: False)

Currently available official templates:

                                                Official Templates                                                 
┏━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Handle ┃ Name   ┃ URL                          ┃ Prerequisites  ┃ Description                                   ┃
┡━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ mkdocs │ MkDocs │ gh:entangled/template-mkdocs │ python, mkdocs │ Fast, simple project documentation for Python │
└────────┴────────┴──────────────────────────────┴────────────────┴───────────────────────────────────────────────┘

TODO:

closes https://github.com/entangled/entangled.py/issues/11