Reworked rule export
This commit is contained in:
parent
8f6e01c857
commit
7851b038f5
4 changed files with 75 additions and 44 deletions
13
export.py
13
export.py
|
@ -32,15 +32,14 @@ if __name__ == '__main__':
|
|||
|
||||
DB = database.Database()
|
||||
|
||||
if args.rules:
|
||||
if args.count:
|
||||
print(DB.count_rules(first_party_only=args.first_party))
|
||||
else:
|
||||
if args.count:
|
||||
print(DB.count_records(
|
||||
first_party_only=args.first_party,
|
||||
rules_only=args.rules))
|
||||
else:
|
||||
if args.rules:
|
||||
for line in DB.list_rules():
|
||||
print(line)
|
||||
else:
|
||||
if args.count:
|
||||
raise NotImplementedError
|
||||
for domain in DB.export(
|
||||
first_party_only=args.first_party,
|
||||
end_chain_only=args.end_chain,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue