Workflow: POO and individual tables per types
Mostly for performances reasons. First one to implement threading later. Second one to speed up the dichotomy, but it doesn't seem that much better so far.
This commit is contained in:
parent
1484733a90
commit
57416b6e2c
10 changed files with 525 additions and 360 deletions
30
export.py
Executable file
30
export.py
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import database
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# Parsing arguments
|
||||
parser = argparse.ArgumentParser(
|
||||
description="TODO")
|
||||
parser.add_argument(
|
||||
'-o', '--output', type=argparse.FileType('w'), default=sys.stdout,
|
||||
help="TODO")
|
||||
parser.add_argument(
|
||||
'-f', '--first-party', action='store_true',
|
||||
help="TODO")
|
||||
parser.add_argument(
|
||||
'-e', '--end-chain', action='store_true',
|
||||
help="TODO")
|
||||
args = parser.parse_args()
|
||||
|
||||
DB = database.Database()
|
||||
|
||||
for domain in DB.export(first_party_only=args.first_party,
|
||||
end_chain_only=args.end_chain):
|
||||
print(domain, file=args.output)
|
||||
|
||||
DB.close()
|
Loading…
Add table
Add a link
Reference in a new issue