misc: Update README/README.md (#71)
* misc: Update README to README.md This change converts the text-based README to markdown. This works better with modern source-control systems, most notably, GitHub. The README.md has been broken down into sections to better organize the document. This section now included expanded information on Reporting bugs and Requesting Features. Due to renaming 'README' to 'README.md', this code was generating the following for "info.py": ``` README.md = "<FILE CONTENTS HERE>" ``` As '.' is used to access member variables/methods in python. To fix this "infopy.oy" now replaces "." with "_". As such the generated in in "info.py" is now: ``` README_MD = "<FILE CONTENTS HERE>" This puts GitHub Discussions and GitHub Issues towards the top of the list. This is to incentivize their usage. Change-Id: I18018ba23493f43861544497f23ec59f1e8debe1 --------- Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
@@ -51,7 +51,11 @@ args = parser.parse_args()
|
||||
code = code_formatter()
|
||||
|
||||
for source in args.files:
|
||||
src = os.path.basename(source)
|
||||
# We replace the "."s in the file name with underscores to make
|
||||
# it a valid python identifier. With the dot, "README.md" would generate
|
||||
# `README.md = "..."` which is not valid as `md` is not a property of
|
||||
# `README`.
|
||||
src = os.path.basename(source).replace(".", "_")
|
||||
with open(source, "r") as f:
|
||||
data = "".join(f)
|
||||
code("${src} = ${{repr(data)}}")
|
||||
|
||||
Reference in New Issue
Block a user