{"id":13761430,"url":"https://github.com/sgolovine/roll-your-gopher","last_synced_at":"2025-05-10T12:32:29.968Z","repository":{"id":38428940,"uuid":"83815821","full_name":"sgolovine/roll-your-gopher","owner":"sgolovine","description":"A primer to creating your own gopherspace","archived":false,"fork":false,"pushed_at":"2017-03-03T23:45:14.000Z","size":7,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-16T19:33:44.604Z","etag":null,"topics":["gopher","webserver"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgolovine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T15:59:37.000Z","updated_at":"2024-07-30T17:35:07.000Z","dependencies_parsed_at":"2022-08-19T11:31:12.477Z","dependency_job_id":null,"html_url":"https://github.com/sgolovine/roll-your-gopher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolovine%2Froll-your-gopher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolovine%2Froll-your-gopher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolovine%2Froll-your-gopher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolovine%2Froll-your-gopher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgolovine","download_url":"https://codeload.github.com/sgolovine/roll-your-gopher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253415812,"owners_count":21904927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gopher","webserver"],"created_at":"2024-08-03T13:01:54.495Z","updated_at":"2025-05-10T12:32:29.711Z","avatar_url":"https://github.com/sgolovine.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Roll Your Very Own Gopherspace!\n\n## What is This? \nThis 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.\n\n## Who is This For? \n* Anyone with a basic knowlege of Linux wanting to try thier hand at building their very own gopherspace.\n* Geeks that are frustrated by the lack of documentation on Gopherspaces and spent the last 2 hours Googling for solutions to no avail\n\n##  What is Gopher? \nCheck out this [article](https://github.com/sgolovine/roll-your-gopher/blob/master/AboutGopher.txt) from Floodgap (Dec. 2000) \n\n------------------\n\n###  Prerequisites:\n\n1. Ubuntu or another Linux distribution\n2. Python 2.2+ (most distros come with Python preinstalled)\n\nIt 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.\n\nAlthough not required, I also highly recommend Firefox with the OverbiteFF extension, it's a simple extension that lets you browse gopher:// sites using Firefox. \n\n[Get OverbiteFF](http://gopher.floodgap.com/overbite/) \n\n### Installing Gopher\n\nThere are many packages for Gopher these days. For the sake of this document we will be using  [PyGopherd](https://github.com/jgoerzen/pygopherd). If you are using Ubuntu or a Debian derivative distro you can install the `pygophered` package via:\n\t\n\tsudo apt-get install pygopherd\n\t\nAlternatively, you can install it from the Github Repository. I wont be getting into that in this document but the [PyGopherd](https://github.com/jgoerzen/pygopherd) repo gives pretty good instructions on how to do so. \n\nOnce installed, navigate to `localhost:70` (or the ip address of the server you installed it on) to confirm that it's working.\n\n\n### Gopher Daemon and Configuraton Information\n\nHere are some useful commands and location relating to the gopher installation.\n\n*NOTE: These locations/commands are related to the pygopherd package, this might differ if you are using another package for gopher*\n\nGopher Conf: `/etc/pygopherd/pygopherd.config`\n\nGopher Folder: `/var/gopher`\n\nGopher Service: `/etc/init.d/pygopherd`\n\nYou can start/stop/restart the service using:\n\n\tsudo /etc/init.d/pygopherd start\n\tsudo /etc/init.d/pygopherd stop\n\tsudo /etc/init.d/pygopherd restart\n\t\n#### Changing Default Gopher Directory\n\nBy 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).\n\n### Adding Content\n\nNow that you have gopher up and running, you might be wondering how to add content to it.\n\nGopher 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. \n\nHowever 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.\n\n\n#### Gophermap file syntax\n\nThis is my gophersite file:\n\n```plaintext\n\nWelcome to my Gopherspace! \n\nMy name is Sunny Golovine and I am a Computer Science Senior \nat Georgia Southern University currently looking for my next great opportunity after I graduate this May.\n\n\n\nLearn more about me:\n\n0About Me\tabout.txt\n1Projects\t/projects\n0Contact Me\tcontact.txt\n\n\n1Programmer Humor\t/prghumor\n\n\n\nSome external links:\n\nhMy Github\tgithub.html\nhMain Site\tmainsite.html\n\n\nWant to view this website using the gopher:// protocol rather than through a web interface?\nCheck out OverbiteFF, a Firefox extension for viewing gopher:// sites\n\nhOverbiteFF\toverbite.html\n\nIf you're interested in making your own gopher server read my quick guide on setting it up (Updated March 2017)\n\n0Rolling Your Own Gopherspace\tgopherspace.txt\n\n```\n\n\n#### Adding Links\nAs you can see nothing too complicated. The only special syntax is for adding links. Here's the basic template\n\n\t\u003cfiletype\u003eLink Name\u003cTAB\u003elocation\n\t\nSo if I wanted to add a link to a text file called `foo.txt` id use this:\n\n\t0Foo\u003ctab\u003efoo.txt \n\nTo link to another directory:\n\n\t1NewDirectory\u003ctab\u003e/newdir\n\t\n\t\nPlease 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.\n\t\nBelow is a table with all the supported gopher filetypes\n\n|Itemtype |Description      |\n|---------|-----------------------|\n|0        |text             |\n|1        |gopher menu      |       \n|5        |zip file         |          \n|7        |search server    |                             \n|9        |generic binary   |                                  \n|I        |generic image    |                             \n|g        |gif image        |                           \n|s        |sound/audio file |                               \n|h        |html             |  \n\nAdding any filetype follows the basic syntax above. \n\n#### Using Additional Gophermaps\n\nYou 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. \n\n#### Linking to non-gopher sites\n\nAdding links in gopher to non-gopher (http) sites requires a slight workaround. If you were to add a link in your menu as such\n\n\thGoogle\thttp://www.google.com\nIt would direct you to:\n\n\tgopher://http//www.google.com/:70/h/Google\n\t\nNot 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:\n\n\n\t\u003chtml\u003e\n\t\t\u003chead\u003e\n\t\t\t\u003cmeta http-equiv=\"refresh\" content=\"0; url=http://www.google.com\" /\u003e\n\t\t\u003c/head\u003e\n\t\t\u003cbody\u003e\n\t\t\t\u003ca href=\"http://www.google.com\"\u003eIf you are not automaticaly redirected, click here\u003c/a\u003e\n\t\t\u003c/body\u003e\n\t\u003c/html\u003e\n\t\nThis will redirect the user and give the user an option to redirect manually if the browser fails to do so. \n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolovine%2Froll-your-gopher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgolovine%2Froll-your-gopher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolovine%2Froll-your-gopher/lists"}