Add note about generated content, update paths
This commit is contained in:
+4
-3
@@ -156,10 +156,11 @@ def projects(
|
||||
print(output)
|
||||
else:
|
||||
text = readme.read()
|
||||
start_str = "<!-- START bin/project.py -->\n"
|
||||
start_str = "<!-- START bin/projects.py -->\n"
|
||||
start = text.find(start_str)
|
||||
end = text.find("<!-- END bin/project.py -->\n")
|
||||
new_text = f"{text[:start + len(start_str)]}\n{output}\n{text[end:]}"
|
||||
end = text.find("<!-- END bin/projects.py -->\n")
|
||||
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.write(new_text)
|
||||
|
||||
Reference in New Issue
Block a user