fead


Namefead JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryAdvert generator from web feeds
upload_time2024-01-09 23:01:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords rss atom
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fead

This is a tool for advertising other blogs you like on your own
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.11+ 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
$ fead --help
Usage: fead [OPTION]...

Generate adverts from web feeds.

Options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -F PATH, --feeds PATH
                        file containing newline-separated web feed URLs
  -f URL, --feed URL    addtional web feed URL (multiple use)
  -s, --strict          abort when fail to fetch or parse a web feed
  -n N, --count N       maximum number of ads in total (default to 3)
  -p N, --per-feed N    maximum number of ads per feed (default to 1)
  -l N, --length N      maximum summary length (default to 256)
  -t PATH, --template PATH
                        template file (default to stdin)
  -o PATH, --output PATH
                        output file (default to stdout)

Any use of -f before -F is ignored.
```

## Template

The template is used by Python [`str.format`][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`][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 "<article>
  <h3><a href='{link}'>{title}</a></h3>
  {summary}&mdash;<a href='{source_link}'>{source_title}</a>, {time:%F}
</article>" | fead -F feeds -f https://drewdevault.com/blog/index.xml -n 2
```

## Contributing

Patches should be sent to [~cnx/misc@lists.sr.ht]
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)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either [version 3 of the License][agplv3],
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
[git send-email]: https://git-send-email.io
[agplv3]: https://www.gnu.org/licenses/agpl-3.0.html

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fead",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Nguy\u1ec5n Gia Phong <~cnx/misc@lists.sr.ht>",
    "keywords": "rss,atom",
    "author": null,
    "author_email": "Nguy\u1ec5n Gia Phong <cnx@loang.net>, Ng\u00f4 Ng\u1ecdc \u0110\u1ee9c Huy <huyngo@disroot.org>",
    "download_url": "https://files.pythonhosted.org/packages/2d/84/f021fa36d2bfd0d12f73d09c85c4379896946af357f58f3632f7b261e112/fead-1.0.0.tar.gz",
    "platform": null,
    "description": "# fead\n\nThis is a tool for advertising other blogs you like on your own\nby embedding the summary of their latest post(s) extracted from their web feed.\nIt is a rewrite of [openring] with ([rejected]) concurrency support\nin Python without any third-party library.\n\n## Installation\n\nOn POSIX systems, run the usual `make install` with configurable `PREFIX`.\nThe following programs are needed for building and installation:\n\n- make\n- help2man\n- install\n\nPython 3.11+ is also required, both for generating the manual and at runtime.\n\nOn other systems, a [package installer specific for Python][pip]\nmight be preferred.\n\n## Usage\n\n```console\n$ fead --help\nUsage: fead [OPTION]...\n\nGenerate adverts from web feeds.\n\nOptions:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -F PATH, --feeds PATH\n                        file containing newline-separated web feed URLs\n  -f URL, --feed URL    addtional web feed URL (multiple use)\n  -s, --strict          abort when fail to fetch or parse a web feed\n  -n N, --count N       maximum number of ads in total (default to 3)\n  -p N, --per-feed N    maximum number of ads per feed (default to 1)\n  -l N, --length N      maximum summary length (default to 256)\n  -t PATH, --template PATH\n                        template file (default to stdin)\n  -o PATH, --output PATH\n                        output file (default to stdout)\n\nAny use of -f before -F is ignored.\n```\n\n## Template\n\nThe template is used by Python [`str.format`][format] to generate each advert.\nIt can contain the following fields, delimited by braces (`{` and `}`).\n\n* `source_title`: title of the web feed\n* `source_link`: URL to the feed's website\n* `title`: title of the feed item\n* `link`: URL to the item\n* `time`: publication time\n* `summary`: truncated content or description\n\nThe publication time is a Python [`datetime.datetime`][datetime] object,\nwhich supports at least C89 format codes, e.g. `{time:%Y-%m-%d}`.\n\n## Examples\n\nGiven the these URLs in a `feeds` file:\n\n    https://adol.pw/index.xml\n    https://cnx.gdn/feed.xml\n    https://xrvs.net/index.xml\n\nAdvertisement of the two latest blogs among them, along with articles\nby Drew DeVault, can be generated via the following command.\n\n```sh\necho \"<article>\n  <h3><a href='{link}'>{title}</a></h3>\n  {summary}&mdash;<a href='{source_link}'>{source_title}</a>, {time:%F}\n</article>\" | fead -F feeds -f https://drewdevault.com/blog/index.xml -n 2\n```\n\n## Contributing\n\nPatches should be sent to [~cnx/misc@lists.sr.ht]\nusing [git send-email] with the following configurations:\n\n    git config sendemail.to '~cnx/misc@lists.sr.ht'\n    git config format.subjectPrefix 'PATCH fead'\n\nBug reports and feedbacks should be sent to the same list,\nwith the program's name mention in the subject.\n\n## Copying\n\n![AGPLv3](https://www.gnu.org/graphics/agplv3-155x51.png)\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, either [version 3 of the License][agplv3],\nor (at your option) any later version.\n\n[openring]: https://sr.ht/~sircmpwn/openring\n[rejected]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/27621\n[pip]: https://pip.pypa.io\n[format]: https://docs.python.org/3/library/string.html#formatstrings\n[datetime]: https://docs.python.org/3/library/datetime.html#datetime-objects\n[~cnx/misc@lists.sr.ht]: https://lists.sr.ht/~cnx/misc\n[git send-email]: https://git-send-email.io\n[agplv3]: https://www.gnu.org/licenses/agpl-3.0.html\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Advert generator from web feeds",
    "version": "1.0.0",
    "project_urls": {
        "Source": "https://trong.loang.net/~cnx/fead"
    },
    "split_keywords": [
        "rss",
        "atom"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "93d8664ee89fffaeca90313ad96504a12eaca46a95f2f13eb3db45a9f3161356",
                "md5": "b26f9c73bc4fde8bd434120c73b3fad4",
                "sha256": "a6fb80f234a087043f4061bbb884c5d99ba38a5e05b0cf47dbff571fe6c704ac"
            },
            "downloads": -1,
            "filename": "fead-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b26f9c73bc4fde8bd434120c73b3fad4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 18518,
            "upload_time": "2024-01-09T23:01:52",
            "upload_time_iso_8601": "2024-01-09T23:01:52.729287Z",
            "url": "https://files.pythonhosted.org/packages/93/d8/664ee89fffaeca90313ad96504a12eaca46a95f2f13eb3db45a9f3161356/fead-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2d84f021fa36d2bfd0d12f73d09c85c4379896946af357f58f3632f7b261e112",
                "md5": "0e9ba265ba5891d30ce97a96e9bf8f0e",
                "sha256": "9ba51ca4b7bb57e12d2aeb7814954ca6c073e228c4e32ca5593c92c45249239b"
            },
            "downloads": -1,
            "filename": "fead-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e9ba265ba5891d30ce97a96e9bf8f0e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17936,
            "upload_time": "2024-01-09T23:01:55",
            "upload_time_iso_8601": "2024-01-09T23:01:55.517699Z",
            "url": "https://files.pythonhosted.org/packages/2d/84/f021fa36d2bfd0d12f73d09c85c4379896946af357f58f3632f7b261e112/fead-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 23:01:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fead"
}
        
Elapsed time: 0.17179s