lz4.py: move logger trash to home
This commit is contained in:
@@ -16,11 +16,15 @@ COMPRESS = 1
|
||||
EXPAND = 2
|
||||
|
||||
|
||||
def get_trash(instrument):
|
||||
return os.path.expanduser(f'~/sea_logger_trash_{instrument}')
|
||||
|
||||
|
||||
def treat(instrument, yearlimit):
|
||||
trash = get_trash(instrument)
|
||||
logbase = '%slogger/' % instdir(instrument)
|
||||
os.chdir(logbase)
|
||||
print('chdir', logbase)
|
||||
trash = '../loggertrash'
|
||||
os.makedirs(trash, exist_ok=True)
|
||||
for ynum in range(2007, 2040):
|
||||
year = str(ynum)
|
||||
@@ -105,6 +109,6 @@ if __name__ == '__main__':
|
||||
treat(instrument, year)
|
||||
print('if you are sure nothing is lost, you may delete loggertrash:')
|
||||
for instrument in instruments:
|
||||
tr = instdir(instrument) + 'loggertrash'
|
||||
print(f' rm -r {tr}')
|
||||
trash = get_trash(instrument)
|
||||
print(f' rm -r {trash}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user