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

edit tranfer script

parent c4d9d230
No related branches found
No related tags found
5 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,!66Lmod eb
Pipeline #
...@@ -29,7 +29,7 @@ if [ "$1" = "-c" ]; then ...@@ -29,7 +29,7 @@ if [ "$1" = "-c" ]; then
# filtering html files # filtering html files
echo "$(tput setaf 12)($counter/$count)$(tput setaf 11)$i"; echo "$(tput setaf 12)($counter/$count)$(tput setaf 11)$i";
counter=$((counter+1)) counter=$((counter+1))
printf "$(tput setaf 15)\t\tFiltering html files...\n"; printf "\t\tFiltering html files...\n";
HEAD=$(grep -n -m1 '<h1' "$i" |cut -f1 -d: | tr --delete '\n') HEAD=$(grep -n -m1 '<h1' "$i" |cut -f1 -d: | tr --delete '\n')
END=$(grep -n -m1 '<!-- <div tal:content=' "$i" |cut -f1 -d: | tr --delete '\n') END=$(grep -n -m1 '<!-- <div tal:content=' "$i" |cut -f1 -d: | tr --delete '\n')
...@@ -39,7 +39,7 @@ if [ "$1" = "-c" ]; then ...@@ -39,7 +39,7 @@ if [ "$1" = "-c" ]; then
sed '1,'"$((HEAD-1))"'d' "$i" | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' > "${i%.*}TMP.html" sed '1,'"$((HEAD-1))"'d' "$i" | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' > "${i%.*}TMP.html"
# converted .html to .md # converted .html to .md
printf "\t\t.html => $(tput setaf 13).md\n$(tput setaf 15)" printf "\t\t.html => .md\n"
pandoc -f html -t markdown+pipe_tables-grid_tables "${i%.*}TMP.html" -o "${i%.*}.md"; pandoc -f html -t markdown+pipe_tables-grid_tables "${i%.*}TMP.html" -o "${i%.*}.md";
rm "${i%.*}TMP.html" rm "${i%.*}TMP.html"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment