From 81854d85ac7a825f430e925344176abfe3a16e55 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 9 Nov 2022 07:35:40 +0900 Subject: Polish for distribution --- doc/fead.h2m | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/fead.h2m (limited to 'doc/fead.h2m') diff --git a/doc/fead.h2m b/doc/fead.h2m new file mode 100644 index 0000000..c3b19b9 --- /dev/null +++ b/doc/fead.h2m @@ -0,0 +1,34 @@ +[template] +The template is used by Python str.format to generate each advert. +It can contain the following fields, delimited by braces ('{' and '}'). + + source_title title of the web feed + source_link URL to the feed's website + title title of the feed item + link URL to the item + time publication time + summary truncated content or description + +The publication time is a Python datetime.datetime object, +which supports at least C89 format codes, e.g. {time:%Y-%m-%d}. + +[examples] +Given the these URLs in a feeds file: + + https://adol.pw/index.xml + https://cnx.gdn/feed.xml + https://xrvs.net/index.xml + +Advertisement of the two latest blogs among them, along with articles +by Drew DeVault, can be generated via the following command. + + echo "
+

{title}

+ {summary}—{source_title}, {time:%F} +
" | fead -F feeds -f https://drewdevault.com/blog/index.xml -n 2 + +[reporting bugs] +Issues should be reported to <~cnx/misc@lists.sr.ht>. + +[see also] +python(1), strftime(3) -- cgit 1.4.1