Add note about generated content, update paths

This commit is contained in:
Joe Rickerby
2020-12-12 12:38:01 +00:00
parent 6974680571
commit 4ac5feb6bb
2 changed files with 9 additions and 6 deletions
+5 -3
View File
@@ -105,7 +105,9 @@ For more information, including how to build on GitHub Actions, Appveyor, Azure
Options Options
------- -------
<!-- START bin/project.py --> <!-- START bin/projects.py -->
<!-- this section is generated by bin/projects.py. Don't edit it directly, instead, edit docs/data/projects.yml -->
| Name | CI | OS | Notes | | Name | CI | OS | Notes |
|-----------------------------------|----|----|:------| |-----------------------------------|----|----|:------|
@@ -221,9 +223,9 @@ Options
<!-- xmlstarlet: 7, last pushed 0 days ago --> <!-- xmlstarlet: 7, last pushed 0 days ago -->
<!-- pybind11:scikit_build_example: 1, last pushed 25 days ago --> <!-- pybind11:scikit_build_example: 1, last pushed 25 days ago -->
<!-- END bin/project.py --> <!-- END bin/projects.py -->
> Add your repo here! Send a PR, adding your information to `bin/projects.yml`. > Add your repo here! Send a PR, adding your information to `docs/data/projects.yml`.
> >
> <sup>I'd like to include notes here to indicate why an example might be interesting to cibuildwheel users - the styles/technologies/techniques used in each. Please include that in future additions!</sup> > <sup>I'd like to include notes here to indicate why an example might be interesting to cibuildwheel users - the styles/technologies/techniques used in each. Please include that in future additions!</sup>
+4 -3
View File
@@ -156,10 +156,11 @@ def projects(
print(output) print(output)
else: else:
text = readme.read() text = readme.read()
start_str = "<!-- START bin/project.py -->\n" start_str = "<!-- START bin/projects.py -->\n"
start = text.find(start_str) start = text.find(start_str)
end = text.find("<!-- END bin/project.py -->\n") end = text.find("<!-- END bin/projects.py -->\n")
new_text = f"{text[:start + len(start_str)]}\n{output}\n{text[end:]}" generated_note = f'<!-- this section is generated by bin/projects.py. Don\'t edit it directly, instead, edit {input.name} -->'
new_text = f"{text[:start + len(start_str)]}\n{generated_note}\n\n{output}\n{text[end:]}"
readme.seek(0) readme.seek(0)
readme.write(new_text) readme.write(new_text)