Community gopher hole - Community & Forums Related Discussions

Users browsing this thread: 17 Guest(s)
movq
Long time nixers
mcol had the idea on IRC to show a world map here on nixers.net, with a pin for each member. Maybe it would be fun to do this in the community Gopher hole using asciiworld.

Each member could have a file ".location" in their directory. A cronjob or a CGI script could collect all those files and render the map. The only real problem is: An ASCII world map is pretty "crowded" and you need colors to highlight a location (otherwise it's just too hard to spot the marker). So the map would need to be wrapped in a short HTML file. Here's an example:

Code:
#!/bin/sh

# Latitude (positive is north), longitude (positive is east).
cat >locs <<EOF
points
50 8
40 -74
EOF

cat >map.html <<EOF
<html>
<head>
<style type="text/css">
* { color: grey; background-color: black }
b { color: red }
</style>
<body>
<pre>
EOF

./asciiworld -c 0 -o -l locs -w 84 -h 21 | sed 's#X#<b>X</b>#g' >>map.html

cat >>map.html <<EOF
</pre>
</body>
</html>
EOF

Looks like this in lynx:
[Image: 2020-09-19--19-50-28--%2B0200--pinguin--pid148276.png]

Granted, it doesn't appear to work great in other Gopher clients. Some just pipe the raw HTML file to less(1).

asciiworld itself is a C program and needs shapelib and gd. There are OpenBSD ports for those. (The other shell scripts and Python scripts in the asciiworld repo can be ignored.)

Just an idea. :) A fun excercise in simplicity, because it would probably be much more involved to implement this here on the actual forum.


Messages In This Thread
Community gopher hole - by z3bra - 13-09-2020, 03:16 PM
RE: Community gopher hole - by opfez - 14-09-2020, 01:03 PM
RE: Community gopher hole - by z3bra - 14-09-2020, 03:37 PM
RE: Community gopher hole - by ekangmonyet - 14-09-2020, 11:47 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 02:59 AM
RE: Community gopher hole - by ekangmonyet - 15-09-2020, 05:17 AM
RE: Community gopher hole - by opfez - 15-09-2020, 02:52 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 03:50 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 06:52 PM
RE: Community gopher hole - by z3bra - 18-09-2020, 11:16 AM
RE: Community gopher hole - by pfr - 19-09-2020, 06:22 AM
RE: Community gopher hole - by movq - 19-09-2020, 02:57 PM
RE: Community gopher hole - by pfr - 20-09-2020, 09:10 PM
RE: Community gopher hole - by z3bra - 21-09-2020, 05:22 AM
RE: Community gopher hole - by evbo - 21-09-2020, 11:22 AM
RE: Community gopher hole - by z3bra - 21-09-2020, 01:26 PM
RE: Community gopher hole - by evbo - 21-09-2020, 01:42 PM
RE: Community gopher hole - by z3bra - 21-09-2020, 03:36 PM
RE: Community gopher hole - by opfez - 22-09-2020, 04:23 AM
RE: Community gopher hole - by z3bra - 22-09-2020, 05:12 AM
RE: Community gopher hole - by pfr - 24-09-2020, 12:58 AM
RE: Community gopher hole - by venam - 24-09-2020, 04:01 AM
RE: Community gopher hole - by z3bra - 24-09-2020, 12:32 PM
RE: Community gopher hole - by pfr - 25-09-2020, 01:18 AM
RE: Community gopher hole - by z3bra - 25-09-2020, 06:30 AM
RE: Community gopher hole - by pfr - 25-09-2020, 10:47 AM
RE: Community gopher hole - by z3bra - 25-09-2020, 12:58 PM
RE: Community gopher hole - by pfr - 26-09-2020, 01:53 AM
RE: Community gopher hole - by mcol - 05-10-2020, 02:53 PM
RE: Community gopher hole - by z3bra - 05-10-2020, 02:56 PM
RE: Community gopher hole - by mcol - 05-10-2020, 05:47 PM
RE: Community gopher hole - by Dworin - 06-10-2020, 01:33 AM
RE: Community gopher hole - by z3bra - 06-10-2020, 06:21 AM
RE: Community gopher hole - by pfr - 06-10-2020, 09:03 AM
RE: Community gopher hole - by mcol - 06-10-2020, 01:25 PM
RE: Community gopher hole - by pfr - 02-11-2021, 11:09 PM
RE: Community gopher hole - by z3bra - 03-11-2021, 06:02 AM
RE: Community gopher hole - by jkl - 04-11-2021, 12:41 AM
RE: Community gopher hole - by z3bra - 04-11-2021, 06:22 AM
RE: Community gopher hole - by pfr - 18-11-2021, 08:58 PM
RE: Community gopher hole - by z3bra - 19-11-2021, 03:34 AM
RE: Community gopher hole - by pfr - 21-11-2021, 07:37 AM
RE: Community gopher hole - by ckester - 23-11-2021, 11:30 PM
RE: Community gopher hole - by ckester - 23-08-2022, 01:20 AM
RE: Community gopher hole - by ckester - 29-10-2022, 11:07 PM
RE: Community gopher hole - by z3bra - 03-11-2022, 07:02 AM
RE: Community gopher hole - by pyratebeard - 04-11-2022, 05:18 PM