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:

=> /finger/username username:           get user infos
=> /finger/feed feed:                   get my latest toots
=> /finger/lobsters lobsters:           get lobste.rs hottest stories
=> /finger/weather weather:             get typed-hole.org current weather
=> /finger/temp temp:                   get typed-hole.org current CPU temperature
=> /finger/cyoa cyoa:                   finger your own adventure
=> /finger/textfile textfile:           read a random textfile from textfiles.com
=> /finger/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.0.3.tar.gz (4.5 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.0.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finger2gemtext-0.0.3.tar.gz
  • Upload date:
  • Size: 4.5 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.0.3.tar.gz
Algorithm Hash digest
SHA256 d81df795a9e90b80663d996884030ec134e9d7fede422b58579d476d306d9ed8
MD5 d880ebc9ef2e98bec65bcb650dc3726c
BLAKE2b-256 d56c67f929fec2f9b8daf8af629d15eaa93cf67bfd892dfb80ba111b2c59342d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finger2gemtext-0.0.3-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.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6230f902176e9905d62b8fcaba4036396265bcee1e78aa8f5355d048512f188
MD5 2c914722e35c38ebe2d846fe885b3d5e
BLAKE2b-256 ece6e387a7df83282a9b3e0c3ce04b9935675dce1a41008aae60f9ead0397a90

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.0.3 This release

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