At the moment I have to copy from the pihole web page and paste into a new file.
Then remove the double CR and the Tabs from the end of each line.
I then have to cut and paste the Wildcard domains to a seperate list.
This would speed up sharing, testing and trouble shooting of a blocklist quite a bit so I could add to a blocklist then update gravity then remove all manual entries from the pihole.
My current blacklist has over 150 items on it from about 2 weeks work.
Failing that I would need write a program to parse the teleported files from the json files in QB64.
ok I tried it but this is what I got.
2 are fresh Raspbian installs a few months ago.
It works on one an older pihole install.
From passwd -S
Install date Raspberry pi 02/14/2021 Works
Install date 08/08/2022 not working. 2022-04-04-raspios-buster-armhf.img
Install date 05/25/2022 not working 2022-04-04-raspios-buster-armhf.img
root@pihole7:~# sudo sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 1;"
sudo: sqlite3: command not found
root@pihole7:~#
I have finally used it this is what I have done.
My Domains list was over 900 entries long and getting slow.
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 0;" > exwhite.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 1;" > exblack.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 2;" > regwhite.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 3;" > regblack.txt