Reworked rule export

This commit is contained in:
Geoffrey Frogeye 2019-12-17 13:29:02 +01:00
parent 8f6e01c857
commit 7851b038f5
Signed by: geoffrey
GPG key ID: D8A7ECA00A8CD3DD
4 changed files with 75 additions and 44 deletions

View file

@ -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,