💾 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
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
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 is setup kind of like this:
~/gemini/<your site url>/<content here>
and
~/gemini/gemini.smallweb.space/antenna/
~/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)
git clone https://notabug.org/tinyrabbit/gemini-antenna.git ~/gemini/cgi-bin/gemini.smallweb.space/antenna
cd ~/gemini/cgi-bin/gemini.smallweb.space/antenna
python3
import antennaDB x = antennaDB() x.AntennaDB.createDB()
touch submit
chmod +x submit
vim submit
#!/usr/bin/bash ./direct-ingestion.py --config antenna.conf
touch log
chmod +x log
vim log
#!/usr/bin/bash tail -n 50 antenna.log
touch antenna.log
mv example.conf antenna.conf vim 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
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"
go to your static content directory and create an about.gmi page
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
Gemini Mention this log
Send replies to:
gritty@smallweb.space