Skip to content
Snippets Groups Projects
Commit 8b7af72b authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

update filtering

parent a621a1ab
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
Pipeline #
......@@ -26,7 +26,8 @@ if [ "$1" = "-w" ]; then
wget -bqc --mirror --convert-links --adjust-extension --page-requisites --no-parent https://docs.it4i.cz;
pid=$(pgrep wget);
FILE="docs.it4i.cz/@@search?sort_on=sortable_title&.html"
# loop for all download html files
FILE="docs.it4i.cz/@@search?sort_on=sortable_title&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.html"
# test exists file -> yes - kill process wget
......@@ -56,6 +57,8 @@ if [ "$1" = "-c" ]; then
rm "$i";
echo "$i deleted";
done
rm -rf info;
# create folder info
mkdir info;
......@@ -115,11 +118,11 @@ if [ "$1" = "-c" ]; then
while read y;
do
# search and delete according with filter_auto
cat "${i%.*}.md" | sed -e 's/{'"$y"'}//g' | sed -e 's/\\//g' | sed -e 's/: //g' | sed -e 's/<\/div>//g' | sed '/^<div/d' | sed '/^$/d' > "${i%.*}TMP.md";
cat "${i%.*}.md" | sed -e 's/{'"$y"'}//g' | sed -e 's/\\//g' | sed -e 's/^Q//g' | sed -e 's/: //g' | sed -e 's/<\/div>//g' | sed '/^<div/d' | awk -v RS='\n\n\n\n\n' 1 > "${i%.*}TMP.md";
cat "${i%.*}TMP.md" > "${i%.*}.md";
done
echo "\t\tother filter..."
#echo "\t\tother filter..."
cat filter_other |
while read a;
do
......@@ -127,7 +130,7 @@ if [ "$1" = "-c" ]; then
cat "${i%.*}.md" | sed -e 's/'"$a"'//g' > "${i%.*}TMP.md";
cat "${i%.*}TMP.md" > "${i%.*}.md";
done
# delete temporary files
rm "${i%.*}TMP.md";
......@@ -135,8 +138,3 @@ if [ "$1" = "-c" ]; then
rm filter_autoTMP
rm filter_auto
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment