-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
test
committed
Sep 11, 2024
1 parent
b72af39
commit f81cd6e
Showing
10 changed files
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import yaml, glob, json, os | ||
|
||
if not os.path.isdir("./json"): | ||
os.mkdir("json") | ||
|
||
dataset = {"data": []} | ||
for file in glob.glob("./datasets/*.yaml"): | ||
with open(file, 'r') as yaml_file: | ||
dataset['data'].append(yaml.safe_load(yaml_file)) | ||
|
||
with open('./json/datasets.json', 'w') as file: | ||
with open('./website/datasets.json', 'w') as file: | ||
file.write(json.dumps(dataset, indent=2)) |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.