-
Notifications
You must be signed in to change notification settings - Fork 9
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
Showing
3 changed files
with
54 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import enum | ||
import os | ||
|
||
from benedict import benedict | ||
|
||
from mosartwmpy.utilities.download_data import download_data | ||
|
||
available_data = benedict.from_yaml('./mosartwmpy/data_manifest.yaml') | ||
|
||
data_list = [] | ||
data = [] | ||
|
||
for i, name in enumerate(available_data.keys()): | ||
data_list.append(name) | ||
data.append(f""" | ||
{i + 1}) {name} - {available_data.get(f'{name}.description')}""") | ||
|
||
# clear the terminal | ||
print(chr(27) + "[2J") | ||
|
||
print(f""" | ||
🎶 Welcome to the mosartwmpy download utility! 🎵 | ||
Please select the data you wish to download by typing the number: | ||
""") | ||
|
||
for d in data: | ||
print(f""" | ||
{d}""") | ||
|
||
print(f""" | ||
0) exit | ||
""") | ||
try: | ||
user_input = int(input(""" | ||
Please select a number and press enter: """)) | ||
except: | ||
pass | ||
|
||
if not user_input or user_input == 0 or user_input > len(data): | ||
print(""" | ||
Exiting... | ||
""") | ||
|
||
else: | ||
print("") | ||
print("") | ||
download_data(data_list[user_input - 1]) | ||
|
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