Skip to content

Commit 201334e

Browse files
committed
docs: add usage
- update pyproject description
1 parent 9ebcb38 commit 201334e

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

README.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,64 @@ https://github.com/phthallo/pyflagoras/assets/84078890/5440a9d3-2c49-4200-a52a-f
55

66
## Installation
77
You can install this package from [pypi.org](https://pypi.org)! Open a terminal and run the following:
8-
```python
8+
```
99
pip install pyflagoras
1010
```
1111

12+
## Usage
13+
```
14+
$ pyflagoras --help
15+
usage: pyflagoras [-h] [-f FLAG] [-n NAME] [-v] image
16+
17+
A command line interface tool to generate pride flags from images.
18+
19+
positional arguments:
20+
image Path to the image to generate a flag from.
21+
Examples:
22+
image.png
23+
foo/bar/image.jpg
24+
25+
options:
26+
-h, --help show this help message and exit
27+
-f FLAG, --flag FLAG The ID (<flag_name>_<year_of_release>) of the flag to generate.
28+
Examples:
29+
intersexInclusive_2021
30+
nonbinary_2014
31+
Default:
32+
progressPride_2018
33+
See https://github.com/phthallo/pyflagoras/blob/main/dev/flag_list.txt for a complete list of flag IDs.
34+
-n NAME, --name NAME Customise the name of the final .svg. The following can be used as part of the file name:
35+
Format placeholders:
36+
{n}: File name (e.g celeste_classic)
37+
{N}: File name (full) (e.g celeste_classic.png)
38+
{f}: Flag name (e.g Progress Pride)
39+
{F}: Flag ID (e.g progressPride_2018)
40+
Examples:
41+
pyflagoras celeste_classic.png -n "{f}_{n}" [renders Progress Pride_celeste_classic.svg]
42+
Default:
43+
{n}_{F} [renders celeste_classic_progressPride_2018.svg]
44+
45+
-v, --version show the program's version number and exit
46+
47+
Documentation, issues and more: https://github.com/phthallo/pyflagoras
48+
```
49+
1250
## Development
1351
Substitute `py` for `python3` as necessary.
1452
1. Clone the repository.
15-
```python
53+
```
1654
git clone https://github.com/phthallo/pyflagoras
1755
```
1856
2. Install the build tool.
19-
```python
57+
```
2058
py -m pip install --upgrade build
2159
```
2260
3. `cd` to the root of the repository and build the package.
23-
```python
61+
```
2462
py -m build
2563
```
2664
4. Both the source distribution (`pyflagoras-x.x.x-tar.gz`) and the built distribution (`pyflagoras-x.x.x-py3-none-any.whl`) will be found under the `/dist` subdirectory. You can then install the wheel using:
27-
```python
65+
```bash
2866
py -m pip install dist/pyflagoras-x.x.x-py3-none-any.whl
2967
```
3068

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
authors = [
1616
{ name="Annabel Quach", email="[email protected]" },
1717
]
18-
description = "Generate pride flags from images"
18+
description = "A command line interface tool to generate pride flags from images."
1919
readme = "README.md"
2020
requires-python = ">=3.10"
2121
classifiers = [

0 commit comments

Comments
 (0)