Add readme.md File Generation Code
This commit is contained in:
13
markdown-table.py
Normal file
13
markdown-table.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import json, pandas
|
||||
|
||||
version_file_path= "./version.json"
|
||||
readme_file_path= "./README.md"
|
||||
|
||||
data = json.load(open(version_file_path, 'r'))
|
||||
|
||||
df = pandas.DataFrame.from_dict(data['service']).rename(columns={'type':'Type', 'name':'Name', 'candidate_version':'Candidate Version', 'release_version':'Release Version', 'product_version':'Product Version'})
|
||||
df.drop(['latest_candidate_version'], axis=1, inplace=True)
|
||||
|
||||
with open(readme_file_path, 'w') as file:
|
||||
file.write("# DataSaker\n### {}\n\n".format(data["datasaker"]))
|
||||
file.write("# Service Version\n{}".format(df.to_markdown(index=False)))
|
||||
Reference in New Issue
Block a user