<-- back to the mailing list

[users] Any live gmnigit capsules?

Byron Torres b at torresjrjr.com

Thu Dec 9 11:02:33 GMT 2021

- - - - - - - - - - - - - - - - - - - 

9 Dec 2021 08:51:43 Omar Polo <op at omarpolo.com>:

"Byron Torres" <b at torresjrjr.com> writes:
Does anyone know of a live [gmnigit] instance? I'd like to see one for
myself.
I've been looking for a Gemini version of [stagit], and I came across
gmnigit from the [archives]. The author's entire website and capsule,
including the supposed gmnigit [demo], is down.
=
https://git.sr.ht/~kornellapacz/gmnigit gmnigit
=
https://codemadness.org/stagit.html stagit
=
https://lists.orbitalfox.eu/archives/gemini/2021/006404.html archives
=
gemini://lapacz-kornel.dev/git/gmnigit/ demo
Hello,
I'm using gmnigit at:
    gemini://git.omarpolo.com
and gitolite to manage the repositories.  My setup is like this: in
gitolite.conf I have a rule like:
repo @gemini
    option hook.post-receive = gmnigit
and then a bunch of repositories using that rule
@gemini = a68-mode
@gemini = acmetag
@gemini = blog
@gemini = dots
# ...
In gitolite-admin/local/hooks/repo-specific/gmnigit I have
#!/bin/sh
while read -r _ _ ref; do
    if [ "$ref" != "refs/heads/master" -a \
         "$ref" != "refs/heads/main" ]; then
        continue
    fi
    name="$(basename $PWD)"
    gmnigit -repo . \
        -refs \
        -name "${name%%.git}" \
        -dist ~/public/"${name%%.git}" \
        -url "https://git.omarpolo.com/${name}"
    if [ $? -ne 0 ]; then
        echo "gmnigit failed for $PWD (ref=$ref)"
        exit 1
    fi
done
that generates the repositories.
My only annoyance with gmnigit is its speed: it could save some time by
limiting the number of commits exported, like the last 500 or so, but it
currently exports all of them and that could take a while for medium
repositories.
Overall thought, I'm happy about it, it's been working fine for various
months already.
Cheers,
Omar Polo

Thank you for the in-depth review,and for sharing your script.

Perhaps gmnigit doesn't use cache. idk.

I wish stagit et al. supported a "projects"meta-index page natively, though I supposetaking advantage of their composability mightbe enough to make my own.