npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

copher

v1.4.0

Published

A gopher client using chromium

Downloads

3

Readme

copher

screenshot

copher is a desktop GUI gopher client powered by carlo.

Usage

Note: Chrome or Chromium must be installed.

Install with npm:

$ npm i -g copher

Then run, optionally passing in a gopher URL (defaults to gopher://gopher.floodgap.com):

$ copher [url]

Alternatively, use npx:

$ npx copher [url]

To navigate, click on the blue links on the left. You can go back and forward by using the left and right arrow keys. You can select a new URL to navigate to by pressing the g key.

HTML/web links and Telnet links will open in the system default applications. Images, sound and text files will open as a new page in copher. All other file types are downloaded to disk using Chrome's downloader.

By default, connections will time out after 5 seconds. You can configure the timeout, in milliseconds, by setting the --timeout option.

Gopher Protocol Support

An effort is made to support all of RFC 1436, except for CSO (item type 2).

The following commonly used item-type extensions are supported:

  • i - Non-link text appearing in a Gopher menu.
  • p - Specifically represents PNG images. These are rendered as other images are.
  • h - Items of this type whose selector is of the form URL:http://example.com/foo.html will open in the default browser.
  • s - Sound files are opened in Copher with audio player controls.
  • d - Downloadable files.
  • P - PDF files. These are downloaded like other downloadable files.

If copher does not recognize an item type, it will be treated as a downloadable file.

Copher also supports S/Gopher, allowing for TLS-encrypted gopher sessions. This may be triggered using gophers instead of gopher in URLs, or by adding 100000 to the port, either in a URL or in a Gopher menu entry.

While RFC 1436 states that all text must be ASCII or Latin1, UTF-8 appears to be more prevalant on Gopher servers today, so Copher will interpret text as UTF-8 by default. This can be changed via the --encoding option. iconv-lite is used to convert from various encodings to UTF-8 for rendering. For example, to parse all incoming text as Latin1, try:

$ copher --encoding latin1

Gopher-over-HTTPS Support

Gopher-over-HTTPS is supported by passing a URL template to the --goh option. The template must contain a variable named url and the protocol must be https:. Technically HTTP would also work fine, but it is called Gopher-over-HTTPS, after all!

Example:

$ copher --goh https://goh.commons.host:7070/{?url} gopher://gopher.club

When this is enabled, all traffic will be tunneled over HTTPS through the server at the URL provided, assuming that the HTTPS server is GoH compliant.

Note that when this is enabled, S/Gopher will not work correctly.

Customization

You can provide a --userjs option, passing in an absolute path to a JS file. This file will be inserted inline in a <script> tag. There's no extra API provided, but you can use this to change styles or trigger or handle events, or any number of UI-changing things. The current version of copher is provided as window.copherVersion, in order to deal with any version-to-version differences.

WARNING: Do not blindly accept scripts from other random folks on the internet to include in your --userjs file. While Copher runs inside Chromium and in its own Chrome profile, there's no telling what other damage a script may do. Be diligent and review every line of code you add.

Known Issues

There is a bug that causes a "back" (via left arrow key) to navigate from the initial page to a blank page lacking the ability to move forward again. This is fixed by using Chrome Canary. You can specify which Chrome binary to use by setting the CHROME_PATH environment variable.

License

The MIT License. See LICENSE.txt.