diff options
author | Filip Lajszczak <filip@lajszczak.dev> | 2023-11-05 16:44:11 +0000 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-11-10 10:42:14 -0500 |
commit | dac164892d549b8e4715518c77503efe0b65b5ba (patch) | |
tree | 3fe332156ba3b069f4aadec602740638230133fc /doc | |
parent | e6164fb80b35ae75caea484a23b56eac32fdf083 (diff) |
post: Add convenience procedures for post author, tags, and title.
Author, tags and title metadata are commonly used,
* haunt/post.scm (post-author, post-tags, post-title): New procedures.
* tests/post.scm ("post-author, author metadata", "post-tags, tags
metadata", "post-title, title metadata", "post-author, no metadata",
"post-tags, no metadata", "post-title, no metadata"): New tests.
* doc/haunt.texi (Posts): Docs for new procedures.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/haunt.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/haunt.texi b/doc/haunt.texi index 23f45d8..3deba4c 100644 --- a/doc/haunt.texi +++ b/doc/haunt.texi @@ -530,6 +530,21 @@ specified. Sort @var{posts}, a list of posts, in reverse chronological order. @end deffn +@deffn {Scheme Procedure} post-author @var{post} +Return the author of @var{post}, or @code{#f} if no author is +specified. +@end deffn + +@deffn {Scheme Procedure} post-tags @var{post} +Return list of tags for @var{post}, or the empty list if no tags are +specified. +@end deffn + +@deffn {Scheme Procedure} post-title @var{post} +Return the title of @var{post}, or @code{#f} if no title is +specified. +@end deffn + @deffn {Scheme Procedure} posts/group-by-tag @var{posts} Create an association list of tags mapped to the posts in the list @var{posts} that used them. |