From f10c6aa32650b58a4d69a71bedfc39f6d76699dd Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 9 Nov 2022 15:15:34 +0900 Subject: Force people to read more --- README.md | 38 +++++++++++++++++++++++++++++++++++++- pyproject.toml | 4 ++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4109dba..afa1158 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,20 @@ by embedding the summary of their latest post(s) extracted from their web feed. It is a rewrite of [openring] with ([rejected]) concurrency support in Python without any third-party library. +## Installation + +On POSIX systems, run the usual `make install` with configurable `PREFIX`. +The following programs are needed for building and installation: + +- make +- help2man +- install + +Python 3.6+ is also required, both for generating the manual and at runtime. + +On other systems, a [package installer specific for Python][pip] +might be preferred. + ## Usage ```console @@ -30,7 +44,7 @@ Options: Any use of -f before -F is ignored. ``` -## Template format +## Template The template is used by Python [`str.format`][format] to generate each advert. It can contain the following fields, delimited by braces ('{' and '}'). @@ -45,6 +59,24 @@ It can contain the following fields, delimited by braces ('{' and '}'). The publication time is a Python [`datetime.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. + +```sh +echo "
+

{title}

+ {summary}—{source_title}, {time:%F} +
" | fead -F feeds -f https://drewdevault.com/blog/index.xml -n 2 +``` + ## Contributing Patches should be sent to [~cnx/misc@lists.sr.ht] @@ -53,6 +85,9 @@ using [git send-email] with the following configurations: git config sendemail.to '~cnx/misc@lists.sr.ht' git config format.subjectPrefix 'PATCH fead' +Bug reports and feedbacks should be sent to the same list, +with the program's name mention in the subject. + ## Copying ![AGPLv3](https://www.gnu.org/graphics/agplv3-155x51.png) @@ -64,6 +99,7 @@ or (at your option) any later version. [openring]: https://sr.ht/~sircmpwn/openring [rejected]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/27621 +[pip]: https://pip.pypa.io [format]: https://docs.python.org/3/library/string.html#formatstrings [datetime]: https://docs.python.org/3/library/datetime.html#datetime-objects [~cnx/misc@lists.sr.ht]: https://lists.sr.ht/~cnx/misc diff --git a/pyproject.toml b/pyproject.toml index 2d50dad..b9ccab0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,10 +5,10 @@ build-backend = "flit_core.buildapi" [project] name = "fead" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.6" license = { file = "COPYING" } authors = [ { name = "Nguyễn Gia Phong", email = "mcsinyx@disroot.org" } ] -maintainers = [ { name = "Nguyễn Gia Phong", email = "mcsinyx@disroot.org" } ] +maintainers = [ { name = "Nguyễn Gia Phong", email = "~cnx/misc@lists.sr.ht" } ] keywords = [ "rss", "atom" ] classifiers = [ "Development Status :: 4 - Beta", -- cgit 1.4.1