I have revived the LXer mirror[1]. I
took it down a few months ago because I
wasn't sure that bringing the web into
gopher was the right approach[2], but
then I found that I wasn't using gopher
as much -- it had lost it's utility. So
there's no great philosophical
revelation coming here. I still have
qualms about introducing commercial web
services into gopher, but I read LXer
every morning anyways, so I might as
well read it here.

Having said that, the new version is
much improved over the old, and the
credit belongs to Raymii, who shared his
python web/rss feed scraping program on
his web/gopher site[3]. I used that
program -- and wrote a bash script to
produce a gophermap. I'll drop the bash
script in below the footnotes.

I really enjoyed cmccabe's phlog on the
National Museum of Health and
Medicine[4]. It sounds absolutely
fascinating and extremely gruesome. So
much so that I was surprised that the
kids were along! It would be so
educational, but so disturbing too.
Truth be told, I actually laughed
involuntarily when the full implication
of the kids seeing that stuff hit me,
because it suddenly reminded me of the
infamous "Barbie Museum" scene in the
movie Rat Race! I may have more comedy
than empathy genes!

In other happenings, Solderpunk has
coded a static webserver called shizaru,
and it is up and running at
www.circumlunar.space. There's more
information in the announcements section
of the BBS. If you have an account at
circumlunar.space and you want some web
space, email me and I'll set you up.
([email protected])


[1] gopher://gopher.visiblink.ca/1/LXer/
[2] gopher://zaibatsu.circumlunar.space/0/%7evisiblink/phlog/20190124
[3] gopher://raymii.org/0/totext.py-Convert_URL_or_RSS_feed_to_plaintext_with_readability.txt
[4] gopher://colorfield.space/0/%7ecmccabe/07-med-history-museum.txt


[script updated June 1, 2019 -- added
the cd line above the python command
so that it runs properly via crontab]

#!/bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Run the totext.py script ( this outputs text files from RSS links to /opt/to-text.py/saved/lxer.com/ )

cd /opt/to-text.py/
python /opt/to-text.py/totext.py --rss --url http://lxer.com/module/newswire/headlines.rss -n

# Clear the destination gopher directory

rm /var/gopher/LXer/*

# move the text files to the gopher directory

mv /opt/to-text.py/saved/lxer.com/* /var/gopher/LXer/


# Steps to create gophermap

# To remove any working files from previous use
rm /opt/to-text.py/titles.txt /opt/to-text.py/links.txt

# Dump the gopher directory file list to two text files -- one will become the displayed titles in the gophermap, the other will provide the link information.
ls /var/gopher/LXer > /opt/to-text.py/titles.txt
ls /var/gopher/LXer > /opt/to-text.py/links.txt

# Remove the first n characters in each line of the title file (just alter the number to change the number of characters removed)
sed -i -r 's/.{14}//' /opt/to-text.py/titles.txt

# Remove the last n characters in each line (alter the number if required)
sed -i -r 's/.{4}$//' /opt/to-text.py/titles.txt

# To replace underlines with spaces (output to new file)
sed -i 's/_/\ /g' /opt/to-text.py/titles.txt

# Add 0 at the beginning of each line
sed -i 's/^/0/' /opt/to-text.py/titles.txt

# Merge the lines of two files with a tab between the of each file to produce the gophermap
paste /opt/to-text.py/titles.txt /opt/to-text.py/links.txt > /var/gopher/LXer/gophermap

# Add a new blank line to the top of the gophermap
sed -i '1s/^/\n/' /var/gopher/LXer/gophermap

#Add a header to the top of the gophermap
sed -i '1s/^/LXer Mirror (Unofficial)\n/' /var/gopher/LXer/gophermap

# Add a new blank line to the bottom of the gophermap
echo -en '\n' >> /var/gopher/LXer/gophermap

# Add Credits to the bottom of the gophermap
echo -e 0Powered by totext.py from Raymii.org'\t'/totext.py-Convert_URL_or_RSS_feed_to_plaintext_with_readability.txt'\t'raymii.org'\t'70 >> /var/gopher/LXer/gophermap