INNER CODE UNIT · Python

main

blokadaorg/blokada · scripts/convert-domains-to-rules.py:112

def main():
    """Main function."""
    parser = argparse.ArgumentParser(
        description='Convert domains list to declarativeNetRequest rules for Safari Web Extension',
        epilog='''
Examples:
  %(prog)s https://small.oisd.nl/domainswild oisd-small.json
  %(prog)s https://big.oisd.nl/domainswild oisd-big.json
  %(prog)s local-domains.txt custom-rules.json
        ''',
        formatter_class=argparse.RawDescriptionHelpFormatter
    )

    parser.add_argument('source',
                       help='URL or local file path containing domains list')
    parser.add_argument('output',
                       help='Output JSON file name (e.g., oisd-small.json)')
    parser.add_argument('--max-rules',

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…