-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1687 from LizenzFass78851/workflows
add support for generating auto readme for mikrotik lists
- Loading branch information
Showing
6 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Blocklisten (Auf Basis von Host-Dateien für Mikrotik-Router und darauf aufbauende Adblocker-Lösungen) zur Ergänzung nach eigenem Ermessen. Die Listen stammen teilweise von Dritten und können daher nicht auf Richtigkeit geprüft werden. Doppelnennungen möglich. | ||
## Diese Listen sind für den Einsatz an "IPv4" Netzwerke ausgelegt. | ||
|
||
|
||
# Eigene Listen (Copy & Paste): | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Blocklisten (Auf Basis von Host-Dateien für Mikrotik-Router und darauf aufbauende Adblocker-Lösungen) zur Ergänzung nach eigenem Ermessen. Die Listen stammen teilweise von Dritten und können daher nicht auf Richtigkeit geprüft werden. Doppelnennungen möglich. | ||
## Diese Listen sind für den Einsatz an "IPv6" Netzwerke ausgelegt. | ||
|
||
|
||
# Eigene Listen (Copy & Paste): | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
set -e # Beende das Skript bei einem Fehler | ||
|
||
function runner() { | ||
TEMPLATE_S1=./.github/markdown_templates/$ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE/01 | ||
TEMPLATE_S2=./.github/markdown_templates/$ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE/02 | ||
|
||
LINKS=/tmp/$SUCHVERZEICHNIS.txt | ||
|
||
# Hole die Links | ||
if [ -e "$LINKS" ]; then | ||
rm "$LINKS" | ||
fi | ||
|
||
|
||
find ./$ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/* -name '*' -type f \ | ||
| grep -v ".md" \ | ||
| sed 's#^.#https://raw.githubusercontent.com/RPiList/specials/master#g' \ | ||
| grep -v "DomainSquatting/" \ | ||
| sort >> $LINKS | ||
|
||
find ./$ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/* -name '*' -type f \ | ||
| grep -v ".md" \ | ||
| sed 's#^.#https://raw.githubusercontent.com/RPiList/specials/master#g' \ | ||
| grep "DomainSquatting/" \ | ||
| sort >> $LINKS | ||
|
||
# Lösche die Datei | ||
rm $ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE | ||
|
||
# Erstelle die Datei | ||
# Schicht 1 | ||
while read line; do | ||
echo "$line " >> $ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE | ||
done < $TEMPLATE_S1 | ||
|
||
# Die Links | ||
while read line; do | ||
echo "$line " >> $ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE | ||
done < $LINKS | ||
|
||
# Schicht 2 | ||
while read line; do | ||
echo "$line " >> $ARBEITSVERZEICHNIS/$SUCHVERZEICHNIS/$PATCHTHEFILE | ||
done < $TEMPLATE_S2 | ||
|
||
} | ||
|
||
|
||
# Setzte Arbeitsverzeichnis | ||
ARBEITSVERZEICHNIS=Mikrotik-Hosts | ||
|
||
# Voreinstellungen 1 | ||
SUCHVERZEICHNIS=IPv4 | ||
PATCHTHEFILE=readme.md | ||
|
||
runner | ||
|
||
# Voreinstellungen 2 | ||
SUCHVERZEICHNIS=IPv6 | ||
PATCHTHEFILE=readme.md | ||
|
||
runner | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters