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
No related merge requests found
......@@ -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"
......
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