Text News and formatting RSS feeds as plain text

Recently I got a tilde.club account. The account comes with 2 directories -- public_html and public_gopher. So I started messing around with gopher, using the gopher client and the gopherus client.

One of the most useful gopher pages I found was Text News. It sucks down RSS feeds and presents them as nicely formatted plain text.

Very nice, but as an Australian I'd like to read some Australian news. At present I'm not going to make my own gopher page or anything like that, though it would be possible to use the gopher server on tilde to do that, and I might (and/or html).

Very kindly, the Text News page explains how to use the script that grabs HTML and RSS pages and formats them for plain text reading.

So ...

  1. Using gopher, visited Text News on gopher and then downloaded the text file that describes how it works; saved to ... instructions.txt
  2. $ mkdir installs/rsstotext
    $ mv instructions.txt installs/rsstotext/
    $ cd installs/rsstotext
    $ cat instructions.txt
  3. Viewed the file and installed stuff:
    $ sudo apt-get install python python-pip #python2
    $ sudo pip install html2text requests readability-lxml feedparser
    $ git clone https://github.com/RaymiiOrg/to-text.py
  4. Went to find some feeds
    $ links2 -g google.com
  5. Searched for a list of Aussie RSS news feeds; found one at: https://blog.feedspot.com/australian_news_rss_feeds/ Downloaded as ausfeeds.html
  6. Viewed the file and worked out how to most easily pull out the URLs of the feeds; don't mind if it is a little bit manual.
    $ grep xml ausfeeds.html | cut -d'=' -f2 > ausfeeds
  7. Checked usage:
    $ cat instructions.txt
  8. Edited the resulting file, including prepending the appropriate totext.py command to each line, and commenting out the ones I don't want just now.
    $ vim ausfeeds
    $ cat ausfeeds
    #! /bin/bash
    cd /home/username/installs/rsstotext
    echo ABC ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.abc.net.au/news/feed/2942460/rss.xml
    #echo SMH ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.smh.com.au/rssheadlines/top.xml
    echo Age ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.theage.com.au/rssheadlines/top.xml
    echo Huffington Post Australia ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.huffingtonpost.com.au/rss/index.xml
    echo Canberra Times ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.canberratimes.com.au/rss.xml
    #echo WA Today ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.watoday.com.au/rssheadlines/top.xml
    #echo Brisbane Times ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.brisbanetimes.com.au/rssheadlines/top.xml
    echo Done! News stored in /home/username/installs/rsstotext/saved
    sleep 2s
    cd saved
    vfu
  9. Made it executable (later made a soft link into ~/bin):
    $ chmod +x ausfeeds
  10. Try it...
    $ ./ausfeeds

It takes a while, but works fine. A text mode file manager is a good way to view the results; Here we use vfu; here is what it looks like.

A news feed viewed as a formatted text file

Home