Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshod5 committed Jun 28, 2024
1 parent 033d322 commit 812bf0a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions transform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import argparse
import parse

def read_file(filename: str) -> list[str]:
with open(filename) as f:
lines = f.readlines()
return lines

def normalise_imas(name: str) -> str:
imas_split = name.split('/')[1:]
name = '/'.join(imas_split)
name = name.lower()
return name

def parse_args_uda(name: str) -> dict:



def main():
parser = argparse.ArgumentParser(
description='Get args',)
parser.add_argument('filename') # positional argument
args = parser.parse_args()

lines = read_file(args.filename)
for line in lines:
if '|' in line:
imas_name, uda_name = line.split('|')
imas_name = normalise_imas(imas_name)





if __name__ == "__main__":
main()

0 comments on commit 812bf0a

Please sign in to comment.