Skip to content

Commit

Permalink
turn into lib
Browse files Browse the repository at this point in the history
  • Loading branch information
supakeen committed Apr 27, 2023
1 parent 0b3de0e commit 2b79a28
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 140 deletions.
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,28 @@
![rtd badge](https://readthedocs.org/projects/gb/badge/?version=latest) ![license badge](https://gb.readthedocs.io/en/latest/_static/license.svg) ![black badge](https://img.shields.io/badge/code%20style-black-000000.svg)

## About

`gb` or gopherball is a gopher server written in Python with the main goals of
`gb` or gopherball is a gopher library written in Python with the main goals of
ease of use and integration. The name gopherball is inspired by a recurring
theme in the Calvin & Hobbes comicbooks and a tongue in cheek reference of an
alternative to the World Wide Web as we know it today.

## Examples
Quick examples to get you running.
There are several other projects that are built on top of `gb` to get you running:

`gb --mode=implicit .` will start a gopher server on `127.0.0.1` port `7070` serving
a recursive index of files starting from the current directory.
### Server
Check out the [gbs](https://github.com/supakeen/gbs) project.

`gb --mode=implicit --magic .` will start `gb` in magic-mode on `127.0.0.1` port
`7070`. Magic mode will make `gb` guess at filetypes.
### Client
Check out the [gbc](https://github.com/supakeen/gbc) project.

`gb --mode=implicit --host="127.1.1.1" --port 1025 .` will start `gb` in implicit
mode on the chosen ip and port. Note that using ports under 1024 requires
superuser permissions!
### Proxy
Check out the [gbx](https://github.com/supakeen/gbx) project.

## Technology
`gb` is written with the help of Python 3.9 and higher and the Tornado
framework for its networking.

## Modes
`gb` has one main mode of operation that is commonly used. More modes are
planned for the future.

### implicit
Implicit mode serves a directory recursively. Indexes are automatically
generated and text files are served to the client. Data files are also
supported.

## Magic
`gb` will serve all non-directories as type 9 files, these are non-readable
files and most clients will prompt for download. Turning on magic with
`--magic` will let `gb` try to determine the correct filetypes.

## Contributing
The source code for `gb` lives on my Gitea where you can also submit issues and
pull requests. It mostly needs help by people with the ability to test in
The source code for `gb` lives on my GitHub where you can also submit issues
and pull requests. It mostly needs help by people with the ability to test in
various clients and libraries that might still support the gopher protocol.
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poetry]
name = "gb"
version = "0.1.2"
description = "A Python gopher server."
version = "0.1.3"
description = "A Python gopher library."
authors = ["Simon de Vlieger <cmdr@supakeen.com>"]
license = "MIT"
readme = "README.md"
keywords = ["gopher", "server"]
repository = "https://src.tty.cat/supakeen/gb"
keywords = ["gopher", "library"]
repository = "https://github.com/supakeen/gb"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
Expand Down Expand Up @@ -60,8 +60,6 @@ exclude = '''
| dist
)/
'''
[tool.poetry.scripts]
gb = 'gb.__main__:main'

[tool.mypy]
python_version = "3.7"
Expand Down
4 changes: 0 additions & 4 deletions src/gb/__main__.py

This file was deleted.

104 changes: 0 additions & 104 deletions src/gb/command.py

This file was deleted.

0 comments on commit 2b79a28

Please sign in to comment.