• R/O
  • HTTP
  • SSH
  • HTTPS

Tags
Aucun tag

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

Révision 35706daeb11067ffac8035502714bda9c6752ef0
Taille 289 octets
l'heure 2013-04-26 04:09:15
Auteur hylom
Message de Log

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