Skip to content

Commit db1fd3e

Browse files
author
Brian Kohan
committed
more adjustments to markdown readme #48
1 parent c0c5a5a commit db1fd3e

File tree

2 files changed

+23
-283
lines changed

2 files changed

+23
-283
lines changed

README.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# django-typer
22

3-
![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)(https://lbesson.mit-license.org/)
4-
![PyPI version](https://badge.fury.io/py/django-typer.svg)(https://pypi.python.org/pypi/django-typer/)
5-
![PyPI pyversions](https://img.shields.io/pypi/pyversions/django-typer.svg)(https://pypi.python.org/pypi/django-typer/)
6-
![PyPI djversions](https://img.shields.io/pypi/djversions/django-typer.svg)(https://pypi.org/project/django-typer/)
7-
![PyPI status](https://img.shields.io/pypi/status/django-typer.svg)(https://pypi.python.org/pypi/django-typer)
8-
![Documentation Status](https://readthedocs.org/projects/django-typer/badge/?version=latest)(http://django-typer.readthedocs.io/?badge=latest/)
9-
![Code Cov](https://codecov.io/gh/bckohan/django-typer/branch/main/graph/badge.svg?token=0IZOKN2DYL)(https://codecov.io/gh/bckohan/django-typer)
10-
![Test Status](https://github.com/bckohan/django-typer/workflows/test/badge.svg)(https://github.com/bckohan/django-typer/actions/workflows/test.yml)
11-
![Lint Status](https://github.com/bckohan/django-typer/workflows/lint/badge.svg)(https://github.com/bckohan/django-typer/actions/workflows/lint.yml)
12-
![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)(https://github.com/psf/black)
13-
14-
Use Typer to define the CLI for your Django management commands. Provides a TyperCommand class that inherits from BaseCommand and allows typer-style annotated parameter types. All of the BaseCommand functionality is preserved, so that TyperCommand can be a drop-in replacement.
3+
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![PyPI version](https://badge.fury.io/py/django-typer.svg)](https://pypi.python.org/pypi/django-typer/)
6+
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/django-typer.svg)](https://pypi.python.org/pypi/django-typer/)
7+
[![PyPI djversions](https://img.shields.io/pypi/djversions/django-typer.svg)](https://pypi.org/project/django-typer/)
8+
[![PyPI status](https://img.shields.io/pypi/status/django-typer.svg)](https://pypi.python.org/pypi/django-typer)
9+
[![Documentation Status](https://readthedocs.org/projects/django-typer/badge/?version=latest)](http://django-typer.readthedocs.io/?badge=latest/)
10+
[![Code Cov](https://codecov.io/gh/bckohan/django-typer/branch/main/graph/badge.svg?token=0IZOKN2DYL)](https://codecov.io/gh/bckohan/django-typer)
11+
[![Test Status](https://github.com/bckohan/django-typer/workflows/test/badge.svg)](https://github.com/bckohan/django-typer/actions/workflows/test.yml)
12+
[![Lint Status](https://github.com/bckohan/django-typer/workflows/lint/badge.svg)](https://github.com/bckohan/django-typer/actions/workflows/lint.yml)
13+
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
14+
15+
Use [Typer](https://typer.tiangolo.com/) to define the CLI for your [Django](https://www.djangoproject.com/) management commands. Provides a TyperCommand class that inherits from [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand) and allows typer-style annotated parameter types. All of the BaseCommand functionality is preserved, so that TyperCommand can be a drop-in replacement.
1516

1617
**django-typer makes it easy to:**
1718

@@ -20,8 +21,8 @@ Use Typer to define the CLI for your Django management commands. Provides a Type
2021
- Use the full power of Typer's parameter types to validate and parse command line inputs.
2122
- Create beautiful and information dense help outputs.
2223
- Configure the rendering of exception stack traces using rich.
23-
- Install shell tab-completion support for TyperCommands and normal Django commands for bash, zsh, fish, and powershell.
24-
- Create custom and portable shell tab-completions for your CLI parameters.
24+
- [Install shell tab-completion support](https://django-typer.readthedocs.io/en/latest/shell_completion.html) for TyperCommands and normal Django commands for [bash](https://www.gnu.org/software/bash/), [zsh](https://www.zsh.org/), [fish](https://fishshell.com/), and [powershell](https://learn.microsoft.com/en-us/powershell/scripting/overview).
25+
- [Create custom and portable shell tab-completions for your CLI parameters.](https://django-typer.readthedocs.io/en/latest/shell_completion.html#defining-custom-completions)
2526
- Refactor existing management commands into TyperCommands because TyperCommand is interface compatible with BaseCommand.
2627

2728
Please refer to the [full documentation](https://django-typer.readthedocs.io/) for more information.
@@ -51,11 +52,11 @@ Please refer to the [full documentation](https://django-typer.readthedocs.io/) f
5152
]
5253
```
5354

54-
*You only need to install django_typer as an app if you want to use the shell completion command to enable tab-completion or if you would like django-typer to install rich traceback rendering for you - which it does by default if rich is also installed.*
55+
*You only need to install django_typer as an app if you want to use the shell completion command to enable tab-completion or if you would like django-typer to install [rich traceback rendering](https://django-typer.readthedocs.io/en/latest/howto.html#configure-rich-stack-traces) for you - which it does by default if rich is also installed.*
5556

5657
## Basic Example
5758

58-
For example, TyperCommands can be a very simple drop-in replacement for BaseCommands. All of the documented features of BaseCommand work!
59+
For example, TyperCommands can be a very simple drop-in replacement for BaseCommands. All of the documented features of [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand) work!
5960

6061
```python
6162
from django_typer import TyperCommand
@@ -96,10 +97,12 @@ class Command(TyperCommand):
9697
```
9798

9899
![Multiple Subcommands Example](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/multi.svg)
100+
![Multiple Subcommands Example - create](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/multi_create.svg)
101+
![Multiple Subcommands Example - delete](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/multi_delete.svg)
99102

100103
## Grouping and Hierarchies Example
101104

102-
More complex groups and subcommand hierarchies can be defined. For example, this command defines a group of commands called math, with subcommands divide and multiply:
105+
More complex groups and subcommand hierarchies can be defined. For example, this command defines a group of commands called math, with subcommands divide and multiply. The group has a common initializer that optionally sets a float precision value. We would invoke this command like so:
103106

104107
```bash
105108
./manage.py hierarchy math --precision 5 divide 10 2.1
@@ -133,3 +136,6 @@ class Command(TyperCommand):
133136
```
134137

135138
![Grouping and Hierarchies Example](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/hierarchy.svg)
139+
![Grouping and Hierarchies Example](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/hierarchy_math.svg)
140+
![Grouping and Hierarchies Example](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/hierarchy_math_multiply.svg)
141+
![Grouping and Hierarchies Example](https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/hierarchy_math_divide.svg)

README.rst

Lines changed: 0 additions & 266 deletions
This file was deleted.

0 commit comments

Comments
 (0)