agendafs

A filesystem for your calendar.

git clone git://mccd.space/agendafs
commit 357674c1e85afb8d934fecb15c0ce9387b7d9a89
parent d74ad14311d9e7a453a24049de3d591d31a6e04b
Author: Marc Coquand <marc@coquand.email>
Date:   Sat, 26 Jul 2025 12:43:41 +0200

Add manpages

Implements: https://todo.sr.ht/~marcc/agendafs/27

Diffstat:
MMakefile | 14++++++++++----
MREADME.md | 2+-
Aagendafs.1.scd | 46++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,14 +2,20 @@ CC ?= gcc
 CFLAGS = -Wall -O3
 CFLAGS_DEBUG = -Wall -g -DDEBUG
 LIBS = `pkg-config uuid fuse3 libical --cflags --libs`
+OUTDIR=.build
 
-all: agendafs
+all: agendafs manpages
 
 agendafs: main.c path.c util.c hashmap.c agenda_entry.c tree.c
-	$(CC) $(CFLAGS) *.c -o mount_agendafs $(LIBS)
+	mkdir -p $(OUTDIR)
+	$(CC) $(CFLAGS) *.c -o $(OUTDIR)/mount_agendafs.o $(LIBS)
 
 debug: main.c path.c util.c hashmap.c agenda_entry.c tree.c
-	$(CC) $(CFLAGS_DEBUG) $(DEBUG_FLAGS) *.c -o mount_agendafs-debug $(LIBS)
+	mkdir -p $(OUTDIR)
+	$(CC) $(CFLAGS_DEBUG) $(DEBUG_FLAGS) *.c -o $(OUTDIR)/mount_agendafs_debug.o $(LIBS)
 
 clean:
-	rm -f agendafs agendafs-debug
+	rm -f $(OUTDIR)
+
+manpages:
+	scdoc < agendafs.1.scd > agendafs.1
diff --git a/README.md b/README.md
@@ -11,7 +11,7 @@ Agendafs is still in early development and is alpha-level software. It probably 
 
 ## Installation
 
-Prerequisites: C compiler, libfuse, libuuid, libical and pkg-config. Optionally a `shell.nix` exists which sets up all dependencies for you.
+Prerequisites: scdoc (man pages), C compiler, libfuse, libuuid, libical and pkg-config. Optionally a `shell.nix` exists which sets up all dependencies for you.
 
 You also need to setup a tool that syncs vdir storages to a caldav server, like
 [vdirsyncer](https://vdirsyncer.pimutils.org/en/stable/when.html#) or [pimsync](https://sr.ht/~whynothugo/pimsync/).
diff --git a/agendafs.1.scd b/agendafs.1.scd
@@ -0,0 +1,46 @@
+AGENDAFS(1)
+
+# NAME
+
+agendafs - Mount notes from vdir storages
+
+# SYNOPSIS
+
+*mount_agendafs* [-fnrsvw] [-o _OPTIONS_] _MOUNTPOINT_
+
+# OPTIONS
+
+Most mount options are described in _mount.fuse_(8) and _mount_(8).
+
+*vdir=*_vdirpath_
+	Use the specified vdir storage path as mountpoint. Currently
+	only one calendar is supported. 
+
+# DESCRIPTION
+
+Agendafs is a virtual filesystem that loads vdir storages to a mountpoint, 
+allowing you to create and edit notes. 
+
+# SEE ALSO
+
+_pimsync_(1)
+_mount.fuse_(8)
+_mount_(1)
+_fusermount_(1)
+
+vdirsyncer (https://vdirsyncer.pimutils.org/en/stabl)
+
+# EXAMPLE
+
+To mount a vdir storage with agendafs:
+
+```
+mount_agendafs -o vdir=/home/bob/.calendars/vjournal-calendar /home/bob/journal
+```
+
+# AUTHORS
+
+Maintained by Marc Coquand <marc@coquand.email>. Up do date sources can be found at
+https://git.sr.ht/~marcc/agendafs and bugs/patches can be submitted by email to
+~marcc/agendafs@lists.sr.ht.
+