@@ -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
2316python -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
2925Depending 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+
3534WRITEME creates content primarily from metadata you have already
3635authored for the SOS project. After you have authored metadata and snippet tags
3736for 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
4342WRITEME reads metadata and config data and generates READMEs in the service
@@ -46,7 +45,7 @@ folder for the specified languages, versions, and services.
4645For 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
5251This 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.
6564You 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.
129128To build all READMEs for Rust:
130129
131130```
132- $ python .tools/readmes/ writeme.py --languages Rust:1
131+ $ python -m writeme --languages Rust:1
133132INFO:root:Dry run, no changes will be made.
134133DEBUG:root:Rendering Rust:1:acm
135134DEBUG:root:Rendering Rust:1:api-gateway
@@ -146,5 +145,5 @@ and complete folder override as the value. See dotnetv3 for an example.
146145And 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