1 Star 0 Fork 253

搁浅/python-learn

forked from mktime/python-learn 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
downloads
images
qsbk
.gitignore
2.png
ExcelHelper.py
FSM.py
LICENSE
README.md
SSEncrypt.module
arch-install.md
auto_build.py
baidu_ocr.py
balance_config.ini
balance_query.py
balance_query_batch.txt
bencode.py
bloom_1.cpp
bloom_1.py
bloom_2.py
capture-camera.py
check_https_domain_exp_date.py
contacts.xml
crack_test.py
crack_wifi.txt
data-structure.py
dcm2jpg.py
decrypt_remmina.py
delicious.md
delicious.xml
demo.c
dht_client.py
dou2.py
download.py
egcd.py
export_delicious.sh
fetchurl.py
find_repeat.py
findbig.py
flv2mp4.py
get_bookmarks.py
get_version.py
gpt35.py
howto_terminate_thread.py
http_proxy.py
i3_config
import_ess_picture.py
ipfind.py
joseph-cycle.py
learn-class.py
learn-docker.md
learn-thread.py
learn_thread.py
linux-tips.md
merge_excel.py
monitor.sh
mydict.py
mysql_init.sql
new.txt
ocr_words.py
orm.py
parse_excel.py
parse_json.py
payload.py
pm25.py
print_ascii.py
problem.py
python-learn-1.py
python-learn-2.py
qiubai.py
remote.sh
repeated.sql
rpc_server.py
scan.py
scan2.py
score.py
screen.sh
send_fangtang.py
sina_user.json
smz_report.py
sock5.py
sock_client.py
sock_serv.py
sync_aliyun.py
system_update.py
template.xml
test_img2pdf.py
test_pdf2images.py
torrent_client.py
totp.py
tray.py
update.ico
urls.txt
v2ex.py
v2ex.txt
wifi-keep.sh
wind_crawl.py
xml2vcf.py
克隆/下载
get_bookmarks.py 943 Bytes
一键复制 编辑 原始数据 按行查看 历史
mktime 提交于 11年前 . test delicious convet script
#!/usr/bin/env python
#-*- coding=utf-8 -*-
from xml.dom import minidom
import sys
reload(sys)
sys.setdefaultencoding('utf8')
'''
date 2013-07-20 18:39:01
desc convert delicious xml file to boo markdown format
'''
def parse(xmlfile, outfile):
dom = minidom.parse(xmlfile)
root = dom.documentElement
l = root.getElementsByTagName("post")
f = open(outfile, "a")
for i in l:
link = i.getAttribute("href").decode('utf8')
desc = i.getAttribute("description").decode('utf8')
short = ""
if len(desc) < 7:
short = link[:25] + ">>"
else:
short = desc[:25] + ">>"
record = "[" + short + "](" + link + " \"" + desc + "\")\n\n"
f.write(record)
f.close()
if __name__ == '__main__':
if len(sys.argv) < 2:
print "usage: python get_bookmarks.py outfile"
sys.exit(127)
parse("delicious.xml", sys.argv[2].strip())
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/nankeyang/python-learn.git
git@gitee.com:nankeyang/python-learn.git
nankeyang
python-learn
python-learn
master

搜索帮助