💾 Archived View for gemini.smallweb.space › tech-gemlog › 20230725-setting-up-antenna.gmi captured on 2024-05-26 at 14:41:00. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

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

Setting up Antenna

Steps to get Antenna running as the steps on the site are out of date with the code base (for example, some scripts don't exist and you don't need to set up a cron job because all logs are directly ingested into Antenna instead of being put into a queue and run every 10 minutes)

I am using gmcapsule by @skyjake so your setup will differ a bit.

gmcapsule content

gmcapsule is setup kind of like this:

~/gemini/<your site url>/<content here>

and

~/gemini/gemini.smallweb.space/antenna/

gmcapsule cgi-bin

~/gemini/cgi-bin/gemini.smallweb.space/<cgi scripts here>

NOTE: it's important that you have 2 antenna folders: one for the public-facing static content, and one for the cgi scripts. I have both of mine accessible via gemini://<yoursite>/antenna, but you can set this up in "antenna.conf" (see below)

clone Antenna to your cgi-bin

git clone https://notabug.org/tinyrabbit/gemini-antenna.git ~/gemini/cgi-bin/gemini.smallweb.space/antenna

setup database

cd ~/gemini/cgi-bin/gemini.smallweb.space/antenna

python3

import antennaDB
x = antennaDB()
x.AntennaDB.createDB()

create "create" script (in cgi-bin/antenna/)

touch submit

chmod +x submit

vim submit

#!/usr/bin/bash
./direct-ingestion.py --config antenna.conf

create "log" script

touch log

chmod +x log

vim log

#!/usr/bin/bash

tail -n 50 antenna.log

create log file (if not exists)

touch antenna.log

create antenna.conf

mv example.conf antenna.conf
vim antenna.conf

edit antenna.conf

I uncommented everything except the [rules] section and changed the "cgidir" and "output" dirs to the absolute paths of my folders. e.g.

/home/gemini/gemini/gemini.smallweb.space/antenna

and

/home/gemini/gemini/cgi-bin/gemini.smallweb.space/antenna

fix pageGeneration.py

Line 22 was throwing an error for me so I modified the line to drop "%(entryNr/urlNr)" off the end of the line so it instead read:

outputString = f"{datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')}\t{urlNr}\t{entryNr}\t%.2f"

Create about.gmi

go to your static content directory and create an about.gmi page

Test it out

Navigate to gemini://<yourpage>/antenna/submit

and it should prompt you to submit a location for your gemlog. If it works, you'll see index.gmi created in your static content antenna folder

NOTE: Antenna is hard-coded to only ingest the last 7 days but you can change this. I thought antenna wasn't working because my latest gemlog was over 7 days old.

-----

2023-07-25

Tags: Antenna

Gritty

Replies

Gemini Mention this log

Submit a response URL

Send replies to:

gritty@smallweb.space

Gemlog Index

Capsule Home