Python ftplib

1
2
3
4
5
6
7
8
#!/usr/bin/env python
import ftplib
session = ftplib.FTP('server','usr','pwd')
myfile = open('test.txt','rb')
session.storbinary('STOR test.txt', myfile)
myfile.close()
session.quit()
     

OrgMode Post Process Hook

1
2
3
4
5
6
(defun my-org-post-process-hook()
  (while (re-search-forward "<pre " nil t)
    (replace-match
     "<pre style="background-color:#272821; color: #F8F8F2" "
          t nil)))
(add-hook 'org-export-html-final-hook 'my-org-post-process-hook)

RSS输出添加css支持

修改views/rss.xml, 在xml版本定义下加入:

1
<?xml-stylesheet type="text/css" href="{{ blog.baseurl }}/themes/iNove/style.css" ?>

测试一下是否成功:)