2023-07-10 19:10:49 +00:00
|
|
|
#!/usr/bin/env python3
|
2023-06-11 18:51:03 +00:00
|
|
|
import argparse
|
|
|
|
from nullptr.commander import Commander
|
2024-01-04 20:34:31 +00:00
|
|
|
import os
|
2024-01-09 19:07:27 +00:00
|
|
|
from nullptr.store_analyzer import StoreAnalyzer
|
2023-07-10 17:25:01 +00:00
|
|
|
from nullptr.models.base import Base
|
2023-06-11 18:51:03 +00:00
|
|
|
def main(args):
|
2024-01-04 20:34:31 +00:00
|
|
|
if not os.path.isdir(args.data_dir):
|
|
|
|
os.makedirs(args.data_dir )
|
2024-01-09 19:07:27 +00:00
|
|
|
if args.analyze:
|
|
|
|
a = StoreAnalyzer(verbose=True)
|
|
|
|
a.run(args.analyze)
|
|
|
|
else:
|
|
|
|
c = Commander(args.data_dir)
|
|
|
|
c.run()
|
2023-06-11 18:51:03 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
parser = argparse.ArgumentParser()
|
2024-01-04 20:34:31 +00:00
|
|
|
parser.add_argument('-d', '--data-dir', default='data')
|
2024-01-09 19:07:27 +00:00
|
|
|
parser.add_argument('-a', '--analyze', type=argparse.FileType('rb'))
|
2023-06-11 18:51:03 +00:00
|
|
|
args = parser.parse_args()
|
|
|
|
main(args)
|