Add README.md and Makefile.

This commit is contained in:
2024-12-27 12:11:35 +02:00
parent b52df073e9
commit 90f6ecd024
3 changed files with 66 additions and 0 deletions

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@
/db/initdb.sql
/gemini-grc
run*.sh
/main

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
SHELL := /usr/local/bin/oksh
export PATH := $(PATH)
all: fmt lintfix test clean build
clean:
rm ./main
debug:
@echo "PATH: $(PATH)"
@echo "GOPATH: $(shell go env GOPATH)"
@which go
@which gofumpt
@which gci
@which golangci-lint
# Test
test:
go test ./...
# Format code
fmt:
gofumpt -l -w .
gci write .
# Run linter
lint: fmt
golangci-lint run
# Run linter and fix
lintfix: fmt
golangci-lint run --fix
build:
go build ./main.go

30
README.md Normal file
View File

@@ -0,0 +1,30 @@
# gemini-grc
A Gemini crawler.
URLs to visit as well as data from visited URLs are stored as "snapshots" in the database.
This makes it easily extendable as a "wayback machine" of Gemini.
## Done
- [x] Concurrent downloading with workers
- [x] Concurrent connection limit per host
- [x] URL Blacklist
- [x] Save image/* and text/* files
- [x] Configuration via environment variables
- [x] Storing snapshots in PostgreSQL
- [x] Proper response header & body UTF-8 and format validation
- [x] Follow robots.txt, see gemini://geminiprotocol.net/docs/companion/robots.gmi
- [x] Handle redirects (3X status codes)
- [x] Better URL normalization
## TODO
- [ ] Add snapshot hash and support snapshot history
- [ ] Add web interface
- [ ] Provide a TLS cert for sites that require it, like Astrobotany
## TODO with lower priority
- [ ] Gopher
- [ ] Scroll gemini://auragem.letz.dev/devlog/20240316.gmi
- [ ] Spartan
- [ ] Nex
- [ ] SuperTXT https://supertxt.net/00-intro.html