dotcomboom / pituophis Goto Github PK
View Code? Open in Web Editor NEWGopher client and server library for Python
Home Page: https://dotcomboom.somnolescent.net/pituophis/
License: BSD 2-Clause "Simplified" License
Gopher client and server library for Python
Home Page: https://dotcomboom.somnolescent.net/pituophis/
License: BSD 2-Clause "Simplified" License
In instances where the port that the server is actually being hosted on is different from what is being advertised (a setup similar to https://github.com/dotcomboom/Pituophis/wiki/Pituophis-as-a-LaunchAgent-(macOS)), Pituophis' serve function should have an option for an advertised port that will be used by default for selectors to the same server.
Older servers (like this instance of GopherSurfer 1.1b3r2 I got running on my Power Mac G4 for testing) use text encodings that aren't compatible with UTF-8, causing an error. In my case, macroman
, which Python can decode fine like resp.binary.decode('macroman')
where resp
is a Response object.
(As for the other way around, rest assured that clients like TurboGopher, Cyberdog and GopherVR work fine with Pituophis-based servers on OS 9.)
Occasionally, I've seen selectors like this one used in the Bucktooth section of the Floodgap server.
1Interactive user's guide to Bucktooth /buck/dbrowse?faquse gopher.floodgap.com 70
These have a url-style question mark after the path in the path field.
When turning selectors into requests, Pituophis should separate the path from the query, so these types of requests work correctly.
Current API reference at RTD is broken. Weirdly enough, a manual build works just fine for me.
This will (hopefully) complete compatibility with maps that work with Bucktooth.
Info: gopher://gopher.floodgap.com:70/1/buck/dbrowse?faquse 1a
10:51 i'm used to like
10:51 percent-encoding spaces in urls
10:51 but if i do that in a gophermap, it returns a 404
10:51 so i have to literally put a space in the url
10:51 because it makes the url %2520
10:52 because it,,,percent encodes the percent sign
Gonna need to experiment with this in different clients.
Items in a parsed gophermap that use relative paths (such as somnolians/
as opposed to an absolute path like /somnolians/
) seem to break on Windows. Those ending with a slash like a folder crash the script, just relative links to files in the same directory do not crash but do extremely silly things.
What it should be:
iApples and oranges(t)(t)error.host(t)0
What it is:
iApples and oranges
Result is that in clients that don't go quirks mode on it information selectors in served gophermaps don't work.
Development/test server (like python3 -m http.server
)
Server script quickstart
Quickly grab gopher url contents (curl-like functionality)
gopher://rawtext.club/0/docs/gophernicus/README.Gophermap
Namely..
# Hide a few files from the menu listing generated by *
-hiddenfile.txt
-hiddendir
# Change filetypes for this directory
:png=g
:foo=b
Additional type characters supported by Gophernicus:
# comment - rest of the line is ignored
!title menu title (use on the first line)
-file hide file from listings
:ext=type change filetype (for this directory only)
~ include a list of users with valid ~/public_gopher
% include a list of available virtual hosts
=mapfile include or execute other gophermap
* stop processing gophermap, include file listing
. stop processing gophermap (default)
I imagine !
functions like a Gophertag.
Of type characters that will most likely be left out: ~
, %
, .
. (*
is a glob, those are already implemented). (Executable Gophermaps will most likely be left out for security reasons; an alt handler could be used instead.)
Right now, when you have a glob (i.e. a line with just ?*\t
, it's in a supposedly random order given by whatever glob
thinks is a good idea. Instead, Pituophis should sort this listing alphabetically like how Bucktooth does it, and maybe provide some sort of options for sorting it in a different way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.