Skip to content

Commit a975bb9

Browse files
authored
Update tools README.md to streamline things that are handled by update.py (#7023)
1 parent 3f4a530 commit a975bb9

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

.tools/readmes/README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ This is an internal tool intended for use only by the AWS code examples team.
99

1010
## Prerequisites
1111

12-
You must have a recent version of Python installed to run this tool,
13-
and a recent version of pip (Python's package manager) to install the
14-
required packages.
15-
16-
### Install packages
17-
18-
We recommend a virtual environment. Create a virtual environment
19-
and install packages by running the following commands in the
20-
`.tools/readmes` folder:
12+
We recommend a virtual environment to run this tool.
2113

2214
```
15+
cd .tools/readmes
2316
python -m venv .venv
24-
.venv\Scripts\activate # Windows
25-
source .venv/bin/activate # *nix
26-
python -m pip install -r requirements.txt
17+
18+
# Windows
19+
.venv\Scripts\activate
20+
21+
# Linux or MacOS
22+
source .venv/bin/activate
2723
```
2824

2925
Depending on how you have Python installed and on your operating system,
@@ -32,12 +28,15 @@ the commands might vary slightly. For example, on Windows, use `py` in place of
3228

3329
## Generate a README
3430

31+
> These instructions assume you're running the commands from the `.tools/writeme`
32+
> directory, using the venv installed there.
33+
3534
WRITEME creates content primarily from metadata you have already
3635
authored for the SOS project. After you have authored metadata and snippet tags
3736
for your examples, run the following command in the root folder of the repo:
3837

3938
```
40-
python .tools/readmes/writeme.py --languages <language>:<version> --services <service>
39+
python -m writeme --languages <language>:<version> --services <service>
4140
```
4241

4342
WRITEME reads metadata and config data and generates READMEs in the service
@@ -46,7 +45,7 @@ folder for the specified languages, versions, and services.
4645
For example, to generate an S3 README for Python:
4746

4847
```
49-
python .tools/readmes/writeme.py --languages Python:3 --services s3
48+
python -m writeme --languages Python:3 --services s3
5049
```
5150

5251
This creates a README.md file in the `python/example_code/s3` folder.
@@ -65,7 +64,7 @@ This creates a README.md file in the `python/example_code/s3` folder.
6564
You can get inline usage info by using the `-h` flag:
6665

6766
```
68-
python .tools/readmes/writeme.py -h
67+
python -m writeme -h
6968
```
7069

7170
### Configuration
@@ -129,7 +128,7 @@ This creates the README.md files in `python/example_code/s3` and other folders.
129128
To build all READMEs for Rust:
130129

131130
```
132-
$ python .tools/readmes/writeme.py --languages Rust:1
131+
$ python -m writeme --languages Rust:1
133132
INFO:root:Dry run, no changes will be made.
134133
DEBUG:root:Rendering Rust:1:acm
135134
DEBUG:root:Rendering Rust:1:api-gateway
@@ -146,5 +145,5 @@ and complete folder override as the value. See dotnetv3 for an example.
146145
And yes, building all readmes for all languages after changing metadata or templates is now as easy as
147146

148147
```
149-
python .tools/readmes/writeme.py
148+
python -m writeme
150149
```

0 commit comments

Comments
 (0)