Skip to main content

Browser engine for Gopher

Project description

Gozer: A Browser Engine for the Gopher Protocol

About Gozer

gozer-engine started a project I gave myself to explore the process of building something straight from an RFC spec. It adheres to the syntax specified in RFC 1436 and RFC 4266. It utilizes the Lark package for parsing the Gopher source code.

The goal of this project is to serve as an extensible framework that will allow users to select and/or create their own frontends (e.g. picotui, blessed, PyQt, etc).

Bugs and feature requests are tracked in the Issues section this GitLab project.

Installation

  • From PyPI: pip install gozer_engine
  • From source. Either:
    • Clone this repo locally or
    • Download an artifact from Releases
  • If you want to install Gozer to a specific Python virtaul environment, activate that environment
  • From the project root run pip install .

Usage

The following is a simple script that uses the Gozer API methods to load two pages then go back one page in the history. For an example of a terminal-based browser that utilizes the Gozer engine, see the schism15/gozer-curses> project.

from pprint import pprint as pp
from gozer_engine.gozer import Gozer

def gozer_test():
    first_uri = 'sdf.org'
    second_uri = 'gopherpedia.com'

    gozer = Gozer()

    input('Press Enter to load sdf.org: ')

    gozer.send_request(first_uri)
    pp(gozer.get_page_contents())

    input('Press Enter to load gopherpedia.com: ')
    gozer.send_request(second_uri)
    pp(gozer.get_page_contents())

    input('Press Enter to go back one page in the history: ')
    gozer.back_one_page()
    pp(gozer.get_page_contents())

if __name__ == '__main__':
    gozer_test()

TODO (As of 2021-02-14)

  • Add concept documentation (#38)
  • Add support for a config file (#30)
  • Add more test cases (#23)
  • Fix mock Gopher Server (#35)
  • Investigate Gemini Support (#36)
  • Search support (#16)
  • Add Sphinx Docs (#32)
  • Fix History Bug (#28)
  • Add reload (#27)
  • Publish Package to PyPI (#33)

About Gopher

The Gopher protocol was an Internet protocol that was popular in the early 1990s. Created in 1991 (the same year as HTTP), it was one of the dominant competitors in the World Wide Web space in the early 1990s. Gopher's emphasis was on modeling a hierarchical file-like structure of content on the web and simplicity in implementing server and client software.

With an interface utilized menu-like functionality for navigating through web content, Gopher was suited for text based browsers. Lynx still currently maintains native Gopher support. Though Gopher was eventually overtaken in adoption by HTTP, a community of active Gopherholes continues to this day.

If you are unfamiliar with Gopher, these links will provide some context:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gozer_engine-0.1.4.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gozer_engine-0.1.4-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file gozer_engine-0.1.4.tar.gz.

File metadata

  • Download URL: gozer_engine-0.1.4.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for gozer_engine-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6346b06108857360e1ec3f9cd420177c28da157a746b2eac0e87daae3c5cf828
MD5 7ffd49faa0abb792d790bac51c371ad1
BLAKE2b-256 4ef0f694749e70bf933f21db516257a337b8447703b7ee4cd39c5b8330e81fc9

See more details on using hashes here.

File details

Details for the file gozer_engine-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: gozer_engine-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for gozer_engine-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6581394cae43de44193b6e34876a7ef6d4a12092de471bbc84941fb516caa6
MD5 06c3b427415b7803c5768525936578b7
BLAKE2b-256 0a506ae9365b602bcc4a14f4e6abcc67e057cb5a2e39fa04ce1db4a82bde1dde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page