0ptr/main.py

23 lines
632 B
Python
Raw Normal View History

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