Skip to content

loozhengyuan/blt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blt

PkgGoDev Go Report Card test

Blocklist management tool.

Install

Using go install

go install github.com/loozhengyuan/blt/cmd/blt@latest

Usage

$ blt -h
Blocklist management tool.

Usage:
  blt [command]

Available Commands:
  build       Builds blocklist according to a spec file
  help        Help about any command
  version     Prints the current version information

Flags:
  -h, --help   help for blt

Use "blt [command] --help" for more information about a command.

Examples

Export DNSBL - Simple Format

export:
  destinations:
    - path: simple.txt
      customTemplate: |
        # DNS Blocklist - Simple Format
        # 
        # Generated using the blt tool.
        # https://github.com/loozhengyuan/blt

        {{ range .Items -}}
        {{ . }}
        {{ end -}}

Export DNSBL - HOSTS Format

export:
  destinations:
    - path: hosts.txt
      customTemplate: |
        # DNS Blocklist - HOSTS Format
        # 
        # Generated using the blt tool.
        # https://github.com/loozhengyuan/blt

        {{ range .Items -}}
        127.0.0.1   {{ . }}
        ::1         {{ . }}
        {{ end -}}

Export DNSBL - DNSMASQ Format

export:
  destinations:
    - path: dnsmasq.txt
      customTemplate: |
        # DNS Blocklist - DNSMASQ Format
        # 
        # Generated using the blt tool.
        # https://github.com/loozhengyuan/blt

        {{ range .Items -}}
        address=/{{ . }}/#
        {{ end -}}

Export DNSBL - AdBlock Plus Format

export:
  destinations:
    - path: adblockplus.txt
      customTemplate: |
        ! DNS Blocklist - AdBlock Plus Format
        ! 
        ! Generated using the blt tool.
        ! https://github.com/loozhengyuan/blt

        {{ range .Items -}}
        ||{{ . }}^
        {{ end -}}

License

MIT

Releases

No releases published

Packages

No packages published