Skip to content

Commit

Permalink
Change subfolder to ti
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzroe committed Apr 22, 2024
1 parent 1fc2b1e commit 9243fcd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/scripts/process_and_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ def download_and_extract(url, extract_to):
with open('task.json', 'r') as f:
tasks = json.load(f)
for task in tasks:
dir_path = os.path.join('downloads', task['type'])
dir_path = os.path.join('ti', task['type'])
os.makedirs(dir_path, exist_ok=True)
download_and_extract(task['link'], dir_path)

for root, dirs, files in os.walk('downloads'):
for root, dirs, files in os.walk('ti'):
for file in files:
if file.endswith(".hex"):
hex_path = os.path.join(root, file)
bin_path = hex_path[:-4] + ".bin"
try:
# Использование srec_cat для конвертации
command = f"srec_cat {hex_path} -intel -o {bin_path} -binary"
os.system(command)
os.remove(hex_path)
Expand Down

0 comments on commit 9243fcd

Please sign in to comment.