Coder Social home page Coder Social logo

pygopherd's Introduction

THIS REPOSITORY IS OBSOLETE.

Pygopherd development continues with the Python 3 version at:

<https://github.com/michael-lazar/pygopherd>

OLD readme follows:

README for Pygopherd
===========================================================================

QUICKSTART (Debian)
-------------------

Use the .deb:

dpkg -i pygopherd.deb

or

apt-get install pygopherd

QUICKSTART (non-Debian)
-----------------------

1. Download and install Python 2.2 or above from www.python.org, if not already
   present on your system.

You can run pygopherd either in-place (as a regular user account) or
as a system-wide daemon.  For running in-place, do this:

1. Modify conf/pygopherd.conf:
   * Set usechroot = no
   * Comment out (add a # sign to the start of the line) the 
     pidfile, setuid, and setgid lines
   * Set mimetypes = ./conf/mime.types
   * Set root = to something appropriate.
   * Set port to a number greater than 1024.

2. Modify the first line of executables/pygopherd to reflect
   the location of your Python installation.

3. Invoke pygopherd by running:
   ./executables/pygopherd

For installing:

1. Run python2.2 setup.py install

2. Make sure that the /etc/pygopherd/pygopherd.conf names valid users
   (setuid, setgid) and valid document root (root).

pygopherd's People

Contributors

davidgriffith avatar jgoerzen avatar qunka 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygopherd's Issues

Python 3 Support

Hi John,

I use pygopherd on my server and I really love its ability to serve to both gopher and the web. Such a great idea.

I saw somewhere that you were attempting at one point to update it to python 3. Is that likely to happen? I've also noticed that the package is not in the Debian testing and unstable repositories (at least if I'm reading Debian's package pages correctly). So again, is Python 3 support likely?

Thanks!

Parade of zombies

When pygopherd is first started, things are okay. After it serves up something, then a zombie process appears. The next time it serves a page, that zombie is destroyed and a new zombie appears.

Using Debian 10 (buster) amd64 and version 2.0.18.4+nmu of pygopherd.

Accessing generic CGI/scripting

Hello there, I am trying to create a simple one liner script in my gophermap like this;

=echo "Today's date is: $(date)"

However I can't figure out why using = isn't working for scripts like it should.
Is this implemented in PyGopherd? If it is, how do I enable it?

Thanks!

no attribute PYGmain

Hi,

I'm trying to use PYGhandler and generate a very simple print() just to see what happen
so far my file test.pyg looks like this

#!/usr/bin/python
print('test');

But I get this error

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pygopherd/initialization.py", line 82, in handle
  File "/usr/lib/python2.7/dist-packages/pygopherd/protocols/base.py", line 85, in handle
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/UMN.py", line 60, in prepare
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/dir.py", line 92, in prepare
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/dir.py", line 66, in prep_entries
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/HandlerMultiplexer.py", line 60, in getHandler
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/base.py", line 110, in isrequestforme
  File "/usr/lib/python2.7/dist-packages/pygopherd/handlers/pyg.py", line 20, in canhandlerequest
AttributeError: 'module' object has no attribute 'PYGMain'

Am I missing something in my file ?

Thanks !

Clarification on gophermap grammar

From the man page pygopherd(8) (shortened):

       The gophermap files contain two types of  lines,  which  are  described
       here  using  the  same  convention normally used for command line argu-
       ments.  In this section, the symbol \t will be used to indicate  a  tab
       character, Control-I.

        full line of informational text


        gophertypeDESCRIPTION [ \tselector [ \thost [ \tport ] ] ]


       Note:  spaces  shown above are for clarity only and should not actually
       be present in your file.

       […]

       The  second  type of line represents a link to a file or directory.  It
       begins with a single-character  Gopher  type  (see  Gopher  Item  Types
       below)  followed  immediately  by  a  description  and a tab character.
       There is no space or other separator between the gopher  type  and  the
       description.  The description may contain spaces but not tabs.

Following the paragraph on the second type of line, shouldn't be the grammar read like the following?

        gophertypeDESCRIPTION \t [selector [ \thost [ \tport ] ] ]

It says „followed immediately by a description and a tab character“ while the grammar suggests the
tab character and selector can be omitted together.

Haven't yet had a chance to check how it is in the code, but needs a documentation fix either way.

The impact of this difference can be seen using the following example. Consider the following gophermap line:

i'm blue

With the grammar not requiring a tab after the description, this would become an info line with the text 'm blue. If the tab was required however, it would become a info line with the text i'm blue.

Help with permissions. o/

Lord. :P Everything was going great and I've built a fairly large gopher hole @ gopher://20forbeers.com:70 and then I went and messed up permissions. Now, some of my /folders display 'Unable to access document' when I click on files and dirs that were accessible yesterday.

Yes, it was user error. Is there any documentation that talks about permissions; I think what stumped me up was the gopher:gopher for user:group, but I don't have a gopher user or group... or so I thought. Long story short I need a refresher in permissions, UID/GID for gopher dirs. HELP!

Its odd, too, any page with a gopher map displays my data... but the ones that are just dirs with files/texts/dirs inside of them don't allow to be navigated anymore. They did at one point. Any help would be really appreciated, and you can see the issue @ gopher://20forbeers.com:70. Thanks kindly!

Hostname issue

When not having a gophermap file, and simply refer to a directory the directory will load fine.
But when trying to download something from the directory, it redirects users to the hostname of the server instead of the domain name.

Is there a way to fix this? I couldn't find anything in the config.

Support for user directories would be kinda cool.

Of the ~user sort, so folks on multiuser unix servers could have a public_gopher directory in their /home. I can accomplish basically the same thing with symlinks into /var/gopher, but it may get aggravating having to do it manually at some point.

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.