Commit c3d874e9 authored by Lukáš Krupčík's avatar Lukáš Krupčík

edit tranfer script

parent c4d9d230
Pipeline #1897 passed with stages
in 1 minute and 6 seconds
......@@ -29,7 +29,7 @@ if [ "$1" = "-c" ]; then
# filtering html files
echo "$(tput setaf 12)($counter/$count)$(tput setaf 11)$i";
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')
END=$(grep -n -m1 '<!-- <div tal:content=' "$i" |cut -f1 -d: | tr --delete '\n')
......@@ -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"
# 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";
rm "${i%.*}TMP.html"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment