Last active
March 11, 2020 18:03
-
-
Save hergerr/63ebb43bce27931c8ba1630abcaba2ab to your computer and use it in GitHub Desktop.
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
import sys | |
with open(f'{sys.argv[1]}/GT-{sys.argv[1]}.csv') as file: | |
next(file) | |
for line in file: | |
lst = line.rstrip('\n').split(';') | |
with open(f'{sys.argv[1]}/{lst[0][0:-4]}.txt', 'w') as w_file: | |
w_file.write(f'{lst[-1]} {int((int(lst[3]) + int(lst[5]))/2)} {int((int(lst[4]) + int(lst[6]))/2)} {abs(int(lst[5]) - int(lst[3]))} {abs(int(lst[4]) - int(lst[6]))}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment