Giter Club home page Giter Club logo

roll-your-gopher's Introduction

Roll Your Very Own Gopherspace!

What is This?

This is a technical primer that gives you a crash course on how to setup and create a simple gopherspace. It is by no means an in-depth article.

Who is This For?

  • Anyone with a basic knowlege of Linux wanting to try thier hand at building their very own gopherspace.
  • Geeks that are frustrated by the lack of documentation on Gopherspaces and spent the last 2 hours Googling for solutions to no avail

What is Gopher?

Check out this article from Floodgap (Dec. 2000)


Prerequisites:

  1. Ubuntu or another Linux distribution
  2. Python 2.2+ (most distros come with Python preinstalled)

It should also be noted, if you use a programming text editor that remaps TAB to a number of spaces, you want to make sure that feature is disabled.

Although not required, I also highly recommend Firefox with the OverbiteFF extension, it's a simple extension that lets you browse gopher:// sites using Firefox.

Get OverbiteFF

Installing Gopher

There are many packages for Gopher these days. For the sake of this document we will be using PyGopherd. If you are using Ubuntu or a Debian derivative distro you can install the pygophered package via:

sudo apt-get install pygopherd

Alternatively, you can install it from the Github Repository. I wont be getting into that in this document but the PyGopherd repo gives pretty good instructions on how to do so.

Once installed, navigate to localhost:70 (or the ip address of the server you installed it on) to confirm that it's working.

Gopher Daemon and Configuraton Information

Here are some useful commands and location relating to the gopher installation.

NOTE: These locations/commands are related to the pygopherd package, this might differ if you are using another package for gopher

Gopher Conf: /etc/pygopherd/pygopherd.config

Gopher Folder: /var/gopher

Gopher Service: /etc/init.d/pygopherd

You can start/stop/restart the service using:

sudo /etc/init.d/pygopherd start
sudo /etc/init.d/pygopherd stop
sudo /etc/init.d/pygopherd restart

Changing Default Gopher Directory

By default, the directory where your gopher-related files are stored is in /var/gopher. To change this directory open up pygopherd.config and change the line root=/var/gopher to your desired directory (located around line 120 in the conf).

Adding Content

Now that you have gopher up and running, you might be wondering how to add content to it.

Gopher is remarkably simple to write content for in that unlike traditional sites, you don't actually have to write any code per-say. In your default directory, if you remove the gophermap file and just start adding content like Text Documents, folder and pictures, etc. Gopher will automatically pick those up and display them.

However the gophermap file can be quite useful. It acts as an index.html but for Gopher sites, giving you more control over structure and letting you add text to your pages.

Gophermap file syntax

This is my gophersite file:


Welcome to my Gopherspace! 

My name is Sunny Golovine and I am a Computer Science Senior 
at Georgia Southern University currently looking for my next great opportunity after I graduate this May.



Learn more about me:

0About Me	about.txt
1Projects	/projects
0Contact Me	contact.txt


1Programmer Humor	/prghumor



Some external links:

hMy Github	github.html
hMain Site	mainsite.html


Want to view this website using the gopher:// protocol rather than through a web interface?
Check out OverbiteFF, a Firefox extension for viewing gopher:// sites

hOverbiteFF	overbite.html

If you're interested in making your own gopher server read my quick guide on setting it up (Updated March 2017)

0Rolling Your Own Gopherspace	gopherspace.txt

Adding Links

As you can see nothing too complicated. The only special syntax is for adding links. Here's the basic template

<filetype>Link Name<TAB>location

So if I wanted to add a link to a text file called foo.txt id use this:

0Foo<tab>foo.txt 

To link to another directory:

1NewDirectory<tab>/newdir

Please note here that having actual tabs seperating your name and directory is cruicial. They must be tabs otherwise Gopher simply displays this as text rather than a link.

Below is a table with all the supported gopher filetypes

Itemtype Description
0 text
1 gopher menu
5 zip file
7 search server
9 generic binary
I generic image
g gif image
s sound/audio file
h html

Adding any filetype follows the basic syntax above.

Using Additional Gophermaps

You can use additional gophermaps in subdirectories just like you did in your root. So if I created a directory called foo. I can set the directory structure inside of it using another gophermap. Just like I did for my root directory.

Linking to non-gopher sites

Adding links in gopher to non-gopher (http) sites requires a slight workaround. If you were to add a link in your menu as such

hGoogle	http://www.google.com

It would direct you to:

gopher://http//www.google.com/:70/h/Google

Not where we wanted to go. However, you can direct gopher to an HTML file which, once loaded, will redirect to the HTML site. A simple HTML file to do this would look as such:

<html>
	<head>
		<meta http-equiv="refresh" content="0; url=http://www.google.com" />
	</head>
	<body>
		<a href="http://www.google.com">If you are not automaticaly redirected, click here</a>
	</body>
</html>

This will redirect the user and give the user an option to redirect manually if the browser fails to do so.

roll-your-gopher's People

Contributors

sgolovine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.