intial version
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""
|
||||
Converts a txt file with species of interest and comments (1 per line) into the yaml format expected by the workflow
|
||||
"""
|
||||
LEADING_SPACE = ' '
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open('reference/species_list.txt','rt') as ih, open('reference/species_list.yaml','wt') as oh:
|
||||
oh.write('species_list:\n')
|
||||
for line in ih:
|
||||
if line.startswith('#'):
|
||||
oh.write(LEADING_SPACE+line.strip()+'\n')
|
||||
continue
|
||||
oh.write(LEADING_SPACE+'- '+'_'.join(x.lower() for x in line.strip().split())+'\n')
|
||||
Reference in New Issue
Block a user