x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit ae1630c43b66d73e5927dbf3a49babe676bc519f
parent 49ca4a901102ed9fccd46eb810f2271299b4227b
Author: Oliver Lowe <o@olowe.co>
Date:   Fri, 18 Jul 2025 13:16:17 +0700

lemmyverse: delete

fediverse doesn't really work well enough

Diffstat:
MREADME | 1-
Dbin/lemmyverse | 33---------------------------------
Dman/lemmyverse.1 | 54------------------------------------------------------
3 files changed, 0 insertions(+), 88 deletions(-)

diff --git a/README b/README @@ -9,7 +9,6 @@ The following commands are provided: - hits - count web traffic - hlsget - download the contents of a HLS playlist - jsfmt - format javascript source code -- lemmyverse - find lemmy communities - llm - chat with a remote large language model - precis - summarise text - rfc - read IETF RFC documents diff --git a/bin/lemmyverse b/bin/lemmyverse @@ -1,33 +0,0 @@ -#!/bin/sh - -usage='usage: lemmyverse pattern' -if test $# -ne 1 -then - echo $usage - exit 2 -fi - -cachedir=$HOME/.cache/lemmyverse -if test -n "$XDG_CACHE_HOME" -then - cachedir=$XDG_CACHE_HOME/lemmyverse -fi -mkdir -p $cachedir - -# thousands of spam/bot communities at lemmy.world? -# badnames='enoweiooe' - -cd $cachedir -if ! test -f communities -then - curl --compressed https://lemmyverse.net/data/community.full.json | \ - tr ',' '\n' | \ - tr -d '"{}[]' | \ - grep -E '(^baseurl)|(^name)|(^desc)' > communities -fi - -awk -F : ' -$1 == "baseurl" { instance = $2 } -$1 == "name" { name = $2 } -$1 == "desc" { desc = $2 } -NR % 3 == 0 { printf "%s@%s\t%s\n", name, instance, desc }' communities | sort | grep "$@" diff --git a/man/lemmyverse.1 b/man/lemmyverse.1 @@ -1,54 +0,0 @@ -.Dd -.Dt LEMMYVERSE 1 -.Sh NAME -.Nm lemmyverse -.Nd find lemmy communities -.Sh SYNOPSIS -.Nm -.Ar pattern -.Sh DESCRIPTION -.Nm -finds Lemmy communities indexed by -.Pa lemmyverse.net -using the given regular expression as interpreted by -.Xr grep 1 . -Both the names and descriptions of the communities are searched. -.Pp -On first run, a local community database must be generated. -The full community index is downloaded from -.Pa https://lemmyverse.net -using -.Xr curl 1 , -transformed, -then stored in the user cache directory. -To regenerate the database, -remove the file and run -.Nm -again. -.Sh FILES -.Bl -tag -width Ds -.It Pa communities -Community database from lemmyverse.net. -.El -.Sh ENVIRONMENT -.Nm -uses the following environment variables: -.Bl -tag -width Ds -.It Ev XDG_CACHE_DIR -The directory to store the community database. -If unset, -.Pa $HOME/.cache/lemmyverse -is used. -.El -.Sh EXAMPLES -Find communities for the Plan 9 operating system: -.Dl lemmyverse '(plan9)|(Plan 9)' -.Pp -List all communities from the instance lemmy.sdf.org: -.Dl lemmyverse '@lemmy.sdf.org' -.Sh EXIT STATUS -.Ex -.Sh SEE ALSO -.Xr grep 1 , -.Xr curl 1 , -.Lk https://lemmyverse.net