使用Pandoc批量markdown转html

安装Pandoc

$ sudo apt-get install pandoc

html输出(单文件):

$ pandoc Release-Notest.md -o Release-Notes.html

pdf输出(单文件):

$ pandoc Release-Notest.md -o Release-Notes.pdf

批量:

$ ls *.md > 1.txt
$ cat 1.txt |while read line
> do
> pandoc $line -o $line.html -H header.txt -A footer.txt
> done

-H FILE, –include-in-header=FILE
在header尾部插入文本中的内容.

-B FILE, –include-before-body=FILE
紧跟body后部插入文本中的内容.

-A FILE, –include-after-body=FILE
在body尾部插入文本中的内容.

# pandoc要求输入输出使用utf8编码,可以使用iconv命令进行编码转换

$ iconv -t utf-8 input.txt | pandoc | iconv -f utf-8

更多:
https://pandoc.org/MANUAL.html

WordPress转换MySQL存储引擎InnoDB与MYISAM

ALTER TABLE wp_commentmeta ENGINE=INNODB;
ALTER TABLE wp_comments ENGINE=INNODB;
ALTER TABLE wp_links ENGINE=INNODB;
ALTER TABLE wp_options ENGINE=INNODB;
ALTER TABLE wp_postmeta ENGINE=INNODB;
ALTER TABLE wp_posts ENGINE=INNODB;
ALTER TABLE wp_term_relationships ENGINE=INNODB;
ALTER TABLE wp_term_taxonomy ENGINE=INNODB;
ALTER TABLE wp_terms ENGINE=INNODB;
ALTER TABLE wp_usermeta ENGINE=INNODB;
ALTER TABLE wp_users ENGINE=INNODB;
ALTER TABLE xd_termmeta ENGINE=INNODB;

mysql数据库升级:
mysql_upgrade -uroot -p