Remove feed.py, no longer used - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset b142d15d2742ff652003092a5089168ebb81b208
(DIR) parent 4689c612878eca43ce13ed3c30e5bc7105b3d209
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Fri, 7 Sep 2018 03:10:24
Remove feed.py, no longer used
Diffstat:
feeds/feed.py | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
---
diff -r 4689c612878e -r b142d15d2742 feeds/feed.py
--- a/feeds/feed.py Fri Sep 07 03:09:43 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#!/usr/pkg/bin/python2.7
-
-from __future__ import print_function, unicode_literals
-import feedparser
-
-
-def header(f):
- print('t')
- print('t{title}'.format(**f['feed']))
- print('t')
- print('t')
-
-
-def entry(e):
- desc = e.get('title', '').replace('|', '\|')
- if e.get('author'):
- desc = desc + ' - ' + e.get('author', '').replace('|', '\|')
- print('[h|{desc}|URL:{link}|server|port]'.format(
- desc=desc,
- link=e.get('link', '').replace('|', '\|')))
- if e.get('published'):
- print('t{published}'.format(published=e.get('published', '')))
- print('t')
-
-
-if __name__ == '__main__':
- import os
-
- url = os.getenv('URL')
- feed = feedparser.parse(url)
- header(feed)
- for e in feed['entries']:
- entry(e)