|
@@ -268,6 +268,23 @@ def main():
|
|
|
|
|
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
|
|
+ elif action == 'align-dates':
|
|
|
|
|
+ conn = sqlite3.connect(dbpath)
|
|
|
|
|
+ cursor = conn.cursor()
|
|
|
|
|
+ query = ('select hash, filename, timestamp '
|
|
|
|
|
+ 'from "file"')
|
|
|
|
|
+ cursor.execute(query)
|
|
|
|
|
+
|
|
|
|
|
+ for row in cursor:
|
|
|
|
|
+ fn = os.path.basename(row['filename'])
|
|
|
|
|
+ ts = datetime.fromtimestamp(row['timestamp'])
|
|
|
|
|
+ fl = datetime.strptime(fn[:19], '%Y-%m-%dT%H-%M-%S')
|
|
|
|
|
+
|
|
|
|
|
+ if fl != ts:
|
|
|
|
|
+ print('{}\t{}\t{}'.format(row['hash'],
|
|
|
|
|
+ row['timestamp'],
|
|
|
|
|
+ row['filename']
|
|
|
|
|
+ ))
|
|
|
|
|
|
|
|
elif args.entity == 'station':
|
|
elif args.entity == 'station':
|
|
|
if action == 'list':
|
|
if action == 'list':
|