summary refs log tree commit diff
path: root/archive.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-26 18:00:30 -0400
committerJune McEnroe <june@causal.agency>2020-04-26 18:00:30 -0400
commit3ca8ba8b466028cc5d653b960abd9b2126031fef (patch)
treebc3dd2aa60cbc6b13c36df364d3dbc4ce886ac17 /archive.c
parentPut dates on new lines in index (diff)
downloadbubger-3ca8ba8b466028cc5d653b960abd9b2126031fef.tar.gz
bubger-3ca8ba8b466028cc5d653b960abd9b2126031fef.zip
Add mailto address for the archive
Diffstat (limited to '')
-rw-r--r--archive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 7aa6028..6a3f612 100644
--- a/archive.c
+++ b/archive.c
@@ -31,6 +31,7 @@
 
 const char *baseURL = "";
 const char *baseTitle;
+const char *baseAddress;
 
 static uint32_t uidRead(const char *path) {
 	FILE *file = fopen(path, "r");
@@ -65,7 +66,7 @@ int main(int argc, char *argv[]) {
 	const char *algo = "REFERENCES";
 	const char *search = "ALL";
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "C:a:h:p:s:t:u:vw:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "C:a:h:m:p:s:t:u:vw:"));) {
 		switch (opt) {
 			break; case 'C': {
 				int error = chdir(optarg);
@@ -73,6 +74,7 @@ int main(int argc, char *argv[]) {
 			}
 			break; case 'a': algo = optarg;
 			break; case 'h': concatHead = optarg;
+			break; case 'm': baseAddress = optarg;
 			break; case 'p': port = optarg;
 			break; case 's': search = optarg;
 			break; case 't': baseTitle = optarg;
@@ -88,6 +90,7 @@ int main(int argc, char *argv[]) {
 	if (!host) errx(EX_USAGE, "host required");
 	if (!user) errx(EX_USAGE, "user required");
 	if (!baseTitle) baseTitle = mailbox;
+	if (!baseAddress) baseAddress = user;
 
 	char *pass = NULL;
 	if (passPath) {