README.md
1# Using Synthtool for Python Samples
2
3## Usage
4
51. Copy `synth.py` and `.repo-metadata.json` to your product or sample directory if not already present.
6
7 ```
8 cp synth-template.py PRODUCT_DIR/synth.py
9 cp .repo-metadata-template.json PRODUCT_DIR/.repo-metadata.json
10 ```
11
121. Update `.repo-metadata.json`
13 - Populate `samples` array with appropriate sample information
14 - Opt into desired generation options
15
161. New READMEs will be generated every 24 hours
17
18## Metadata Options
19
20The root directory for samples can be set using `sample_project_dir`. Otherwise, this is set to `samples` if that directory exists, or `.` otherwise.
21
22Each sample in `samples` has the attributes:
23- `name`
24- `description`
25- `file` : The main file associated with this sample
26- `runnable` (Optional) : Either True/False, depending on whether this sample is made to be run by running the above file name, or not.
27- `custom_content` (Optional) : This is custom content that appears after all other information generated about the sample
28- `override_path` (Optional): If you would like to have a seperate README generate for this file in a different folder within the directory that holds the samples, ex. a folder named `quickstart`, specify that relative path here.
29If multiple samples have the same override path, the README in that folder will contain info for all those samples.
30