• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

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


Commit MetaInfo

Révision0dbb52df1d530db7b6a7d8259e866d95f4850396 (tree)
l'heure2013-04-26 03:41:05
Auteurhylom <hylom@hylo...>
Commiterhylom

Message de Log

Merge branch 'live'

Change Summary

Modification

--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ include install.conf
44 DEPENDS=install.conf
55
66 all: install.conf keywords.py
7- python gnews.py
7+ LANG=ja_JP.UTF-8 python gnews.py
88
99 install: install.conf
1010 rsync -av css/ $(INSTALL_DIR)/css
--- a/fetcher.py
+++ b/fetcher.py
@@ -18,11 +18,15 @@ class FeedFetcher(object):
1818 f = feedparser.parse(self._feed["source"])
1919 entries = []
2020 for e in f['entries']:
21+ try:
22+ desc = e.description
23+ except AttributeError:
24+ desc = ''
2125 entry = {
2226 # 'title': e.title.decode('utf8') if isinstance(e.title, str) else e.title,
2327 'title': e.title,
2428 'url': e.link,
25- 'body': e.description,
29+ 'body': desc,
2630 'date': dateutil.parser.parse(e.updated),
2731 'feed': self._feed,
2832 'tags': [],
--- a/templates/index.tmpl.html
+++ b/templates/index.tmpl.html
@@ -6,6 +6,19 @@
66 <!-- Bootstrap -->
77 <link href="${site.css_directory}/bootstrap.min.css" rel="stylesheet">
88 <link href="${site.css_directory}/gnews.css" rel="stylesheet">
9+<script type="text/javascript">
10+ var _gaq = _gaq || [];
11+ _gaq.push(['_setAccount', 'UA-739864-13']);
12+ _gaq.push(['_trackPageview']);
13+ (function() {
14+ var ga = document.createElement('script'); ga.type =
15+'text/javascript'; ga.async = true;
16+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
17+'http://www') + '.google-analytics.com/ga.js';
18+ var s = document.getElementsByTagName('script')[0];
19+s.parentNode.insertBefore(ga, s);
20+ })();
21+</script>
922 </head>
1023
1124 <body class="wrap">
@@ -13,15 +26,15 @@
1326
1427 <!-- タイトル -->
1528 <div class="row" id="site-header">
16- <div class="span9">
29+ <div class="span8">
1730 <header>
1831 <a href="${site.root}">
1932 <img id="sitelogo" src="${site.img_directory}/themesjp.png" alt="Themes.JP"> α
2033 </a>
2134 </header>
2235 </div>
23- <div class="span3 last-update">
24- last update: ${date_format(site.last_update)}
36+ <div class="span4 last-update">
37+ last update: ${date_format(site.last_update)}(GMT)
2538 </div>
2639 </div>
2740