Skip to main content

finger2gemtext - A simple library for converting finger output to Gemtext

Introduction

finger2gemtext is a small and simple library that provides code for converting finger responses into the hypertext markup language of the Gemini project.

Installation

finger2gemtext is available from pypi and can be installed with your package installer of choice.

With pip:

pip install finger2gemtext

With uv:

uv add finger2gemtext

Quick start

The library provides a single main conversion function called finger_to_gemtext. It is passed a string that is the finger response you wish to convert, and the result is a string that is the resulting Gemtext.

A very minimal converter might look like:

import fileinput
from .convert import finger_to_gemtext

def convert() -> None:
    """Parse the input from stdin or files and print the parsed Gemtext."""
    with fileinput.input() as finger_content:
        print(finger_to_gemtext("".join(finger_content)))

While it is primarily intended as a library to be used from other Python code, it does contain a simple test command line tool, which can be accessed either via the Python -m switch, or depending on your environment, via the finger2gemtext command. For example, if you were to run this command:

finger @typed-hole.org | finger2gemtext

you'd get output like this:

[typed-hole.org]

Welcome to the Typed Hole
Uptime:  14:10:28 up 248 days, 22:12,  0 user,  load average: 0.44, 0.34, 0.44
Users currently logged in: probably julien

Available fingers:

=> username username:           get user infos
=> feed feed:                   get my latest toots
=> lobsters lobsters:           get lobste.rs hottest stories
=> weather weather:             get typed-hole.org current weather
=> temp temp:                   get typed-hole.org current CPU temperature
=> cyoa cyoa:                   finger your own adventure
=> textfile textfile:           read a random textfile from textfiles.com
=> smog smog:                   read SMOG e-zine issues

See the main documentation for the full API.

Download files

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

Source Distribution

finger2gemtext-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

finger2gemtext-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file finger2gemtext-0.1.0.tar.gz.

File metadata

  • Download URL: finger2gemtext-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for finger2gemtext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bbfa97852018d9b8013143540a4a216844ee0f100ae0b4f133ac6555fc74d19
MD5 d37b0145c6292cce65570ef755d06a45
BLAKE2b-256 68e418cd643abb1cec703789fc315b240274d34297c887868c38e113e0d0c26c

See more details on using hashes here.

File details

Details for the file finger2gemtext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: finger2gemtext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for finger2gemtext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4017d4d0315bb3d462c5e11ac02485349f1f6c13b8bcba2473934c6827648ed4
MD5 da24ad2f8dbae95e26e56661c5474f66
BLAKE2b-256 80bb77127548870180fee4b69afb81349573e0a71965f5514b90a98ee8bddf82

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page