move a lot of stuff to git

This commit is contained in:
l_samenv
2025-01-17 17:05:02 +01:00
parent be52adfaef
commit b8218e6203
30 changed files with 647 additions and 16 deletions

View File

@ -96,7 +96,7 @@ def treat(action, instrument='', years='past', vars=None):
if not vars:
varlist = list(glob('*'))
else:
varlist = vars
varlist = vars
for variable in varlist:
if action == COMPRESS:
if os.path.isdir(logdir+variable):
@ -110,7 +110,7 @@ def treat(action, instrument='', years='past', vars=None):
if os.path.isfile(gzdir + variable + '.gz'):
expand(logdir, gzdir, variable)
else:
print '%s is missing' % (gzdir + variable + '.gz')
print(gzdir + variable + '.gz', 'is missing')
if __name__ == '__main__':
action = COMPRESS
@ -125,6 +125,8 @@ if __name__ == '__main__':
cleanup = False
elif opt == '-c':
cleanup = False
elif opt == '-n':
action = None
elif opt == '-i':
addto = instruments
elif opt == '-p':
@ -164,10 +166,10 @@ if __name__ == '__main__':
print("years: %s" % repr(years))
print("vars: %s" % ", ".join(vars))
for instrument in instruments:
print(instdir(instrument))
print('instrument:', instdir(instrument))
if cleanup:
for pat in removedirs:
print pat
print('remove', pat)
gap = 0
t0 = time.time()
t1 = t0
@ -182,4 +184,5 @@ if __name__ == '__main__':
gap += 1
time.sleep(min(1.0, now - t1)) # be nice
t1 = now
treat(action, instrument, years, vars)
if action:
treat(action, instrument, years, vars)