Wsparcie dla formatu uBlacklist #5

Merged
wiktor merged 10 commits from ublacklist-format into master 2025-05-29 15:51:53 +02:00
Showing only changes of commit 103034719d - Show all commits

View File

@ -2,13 +2,22 @@ CONVERTER = python3 src/converter.py
BLOCKLISTS = seo-nonsense reflink-spam satire mirror
TARGET_FORMATS = adguard ublacklist
build: $(foreach blocklist, $(BLOCKLISTS), $(foreach targetformat, $(TARGET_FORMATS), dist/$(blocklist)/$(targetformat).txt))
TARGETS = $(foreach blocklist, $(BLOCKLISTS), $(foreach targetformat, $(TARGET_FORMATS), dist/$(blocklist)/$(targetformat).txt))
dist/%.txt:
@mkdir -p $(dir $@) && \
$(CONVERTER) --inputfile src/$(firstword $(subst /, ,$*))-source.json --targetformat $(notdir $*) --outputfile $@
build: $(TARGETS)
dist/%/adguard.txt: src/%-source.json
mkdir -p dist/$*
$(CONVERTER) --inputfile src/$*-source.json --targetformat adguard --outputfile $@
dist/%/ublacklist.txt: src/%-source.json
mkdir -p dist/$*
$(CONVERTER) --inputfile src/$*-source.json --targetformat ublacklist --outputfile $@
clean:
rm -rf dist/*
all: build
.PHONY: build clean all