Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save starter code #1

Open
wants to merge 2 commits into
base: miniconda-release-notes
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/source/update_miniconda_release_notes_rst.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import os
import json



PATH_TO_INFO_JSON = '/Users/paulyim/Desktop/gh_download_test'


def load_info_json(filepath):
with open(filepath) as f:
json_dict = json.load(f)
return json_dict


def main():

# Get all filepaths to json files
filenames = os.listdir(PATH_TO_INFO_JSON)

# For each info.json:
for filename in filenames:
filepath = os.path.join(PATH_TO_INFO_JSON, filename)

# Read info.json
info_dict = load_info_json(filepath)

# Parse for filename of installer
outpath = info_dict['_outpath']

if info_dict['_platform'] == 'win-64':
outpath_parts = outpath.split('\\')
else:
outpath_parts = outpath.split('/')
filename = outpath_parts[-1]
print()
print(filename)

# Parse for openssl version
dists = info_dict['_dists']
for dist in dists:
if dist.startswith('openssl'):
print(dist)


if __name__ == '__main__':
main()