summaryrefslogtreecommitdiff
path: root/math/mkdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/mkdb.c')
-rw-r--r--math/mkdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/math/mkdb.c b/math/mkdb.c
index db07eff..f4a6469 100644
--- a/math/mkdb.c
+++ b/math/mkdb.c
@@ -96,9 +96,17 @@ walk(char **fname)
mp->pdf = strdup(p);
else if (strstr(p, ".zip") != NULL)
mp->code = strdup(p);
+ /* TODO: add doc, rtf, etc. */
}
}
+ /* fallbacks */
+ if (mp->title == NULL)
+ mp->title = mp->dir;
+ if (mp->author == NULL)
+ mp->author = strdup("unknown");
+ if (mp->language == NULL)
+ mp->language = strdup("en");
db_add(mp, parent, id);
closemeta(mp);