resume/make.sh

34 lines
1.3 KiB
Bash
Raw Normal View History

2020-02-23 14:22:13 +00:00
#!/usr/bin/env bash
# 用来将markdown 格式的简历转化成html格式
#
function change(){
echo "convert to html"
pandoc $1 -o $2 &&
sed -i "1i \
<html><head><title>令照辉-Java研发工程师-13157198992</title>\
\\n<meta charset=\"utf-8\"> \
\\n<meta name=\"viewport\" content=\"width=900px, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\">\
\\n <style type=\"text/css\">\\n.main{margin:auto;width:680px;position:relative;}a{color:#4183c4;}\
\\n a:link{color:#4183c4;text-decoration:none;}\
\\n a:visited{color:#4183c4;text-decoration:none;}\
\\n img{position:absolute;right:10px;top:35px;width:140px;height=140px;border-radius: 70px;}\
\\n li{font-size:15px;} \
\\n h3{font-size:18px;margin:5px;}\
\\n h2{font-size:23px;margin:5px;border-bottom: 1px solid #ccc!important;}\
\\n h1{font-size:25px;}\
\\n ul{ margin:5px; } \
\\n h4{margin:5px;} \
\\n ol {margin-left:30px;margin-top:3px;margin-bottom:3px;} \
</style></head><body>\
<div class=\"main\">\
" $2
sed -i "N ; s/<a/<a title=\"请点击查看详细信息,谢谢!\" /g" $2
#sed -i "N ; s/<\/h2>/<\/h2>\\n<hr>/" $2
echo "<img src=\"head.jpg\"></div></body></html>" >> $2
echo "finish"
}
email='zeekling@163.com'
read -p "please input markdown file:" s
read -p "please input output file:" out
change ${s} ${out} ${email}