feed.dcgi - 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
---
feed.dcgi
---
1 #!/bin/sh
2
3 . ../common/config.sh
4 . ../common/feed.sh
5
6 FEED_AUTHOR=yes
7 FEED_DATE=yes
8 ARTICLE_CGI="${CGI_BASEDIR}/lwn/article.cgi"
9
10 filter_entries()
11 {
12 awk '
13 /^\[0\|\[\$\]/ {
14 # ignore all non-free articles
15 next
16 }
17 /\/rss\|server\|port\]$/ {
18 # Get rid of "/rss" in link in order to get the full story
19 # (not few lines of it!)
20 sub(/\/rss/, "/")
21 }
22
23 {
24 print
25 }
26 '
27 }
28
29 echo ""
30 echo "LWN.net"
31 echo ""
32
33 url="https://lwn.net/headlines/newrss"
34 curl -Lgs -- "${url}" |
35 feed_to_gph |
36 filter_entries