• R/O
  • HTTP
  • SSH
  • HTTPS

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

news4 - RSS aggrigation system


File Info

Rev. 35706daeb11067ffac8035502714bda9c6752ef0
大小 289 字节
时间 2013-04-26 04:09:15
作者 hylom
Log Message

fix: crash when RSS item is invalid

Content

#!/usr/bin/python

import sys
import re

HEADER = """#
# -*- coding: utf-8 -*-

keywords = ["""

FOOTER = """]"""

print HEADER

for l in sys.stdin:
    l = l.strip()
    terms = l.split(',')
    t = "    (u'" + "',u'".join(terms) + "',),"
    print t

print FOOTER