💾 Archived View for gemini.ctrl-c.club › ~nristen › gemlog › 20220106.gmi captured on 2022-04-29 at 11:55:26. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

-=-=-=-=-=-=-

Nristen's (g)log
2022-01-06

Gemini Bookmark Solution

I am starting to see many interesting gemini bookmark management solutions which are not tied to one browser or another.

I have used buku as a web bookmark manager. Some of the reasons I like it are:

I tried adding a couple gemini links to it and it works. When I search I just add the "gemini" tag to my search and the results are limited to entries tagged as gemini.

Buku has a feature which will got to a url to retrieve the title of the linked page which doesn't work with gemini pages so I decided to try writing a wrapper script which pulls a likely title from the gemini page and uses that to add to the entry.

I have put the first draft of the script up at the repo:

http://chiselapp.com/user/karlh626/repository/gemark/

Here is the content of the script:

#!/usr/bin/env bash

######################################################
# Name: gemark
# Author: nristen gemini://gemini.ctrl-c.club/~nristen
# Ver: 0.0.1
# Syntax: gemark <gemini url> "<comma separated tag list>"
# Example: gemark gemini://gemini.circumlunar.space/ start,page
# Desc: Add a gemini bookmark to buku bookmark manager
# Depends:  buku    https://github.com/jarun/buku
#           agunua  https://framagit.org/bortzmeyer/agunua
######################################################

########## Config Begin ###########
gem_url="$1"
########### Config End ############

# strip out link from syntax to create tags including gemini tag
tags="gemini,$( echo $@ | cut -d" " -f2- )"

# title: extract first line that begins with a #
title=$( agunua $gem_url | grep -m 1 "^#" | tr -d "#" | sed 's/^ //' )

# --immutable don't lookup title from web
buku --immutable 1 -a $gem_url --title $title --tag $tags

If anyone has any improvements, please post a ticket on the above repo.

--------

Nristen (g)log index

Nristen Home