Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/volfpeter/markyp-rss

markyp-based RSS 2.0 implementation.
https://github.com/volfpeter/markyp-rss

code-generator rss rss-generator

Last synced: 23 days ago
JSON representation

markyp-based RSS 2.0 implementation.

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/volfpeter/markyp-rss.svg?branch=master)](https://travis-ci.org/volfpeter/markyp-rss)
[![Downloads](https://pepy.tech/badge/markyp-rss)](https://pepy.tech/project/markyp-rss)
[![Downloads](https://pepy.tech/badge/markyp-rss/month)](https://pepy.tech/project/markyp-rss/month)
[![Downloads](https://pepy.tech/badge/markyp-rss/week)](https://pepy.tech/project/markyp-rss/week)

# markyp-rss

[markyp](https://github.com/volfpeter/markyp)-based RSS 2.0 implementation.

## Installation

The project is listed on the Python Package Index, it can be installed simply by executing `pip install markyp-rss`.

## Getting started

If you are not familiar with the basic concepts of `markyp`, please start by having a look at its documentation [here](https://github.com/volfpeter/markyp).

Creating an RSS 2.0 feed using `markyp-rss` is as easy as instantiating the required RSS elements and converting the `RSS` object to string when the feed is ready.

```Python
from typing import List, Optional

from markyp_rss.elements import Category, Channel, Image, Item, RSS

def get_items() -> Optional[List[Item]]:
"""Returns the items to be included in the channel."""
return [
Item("First", "https://markyp.demo/first"),
Item("Second", "https://markyp.demo/second"),
Item("Third", "https://markyp.demo/third")
]

rss = RSS(
Channel(
"markyp-rss RSS 2.0 Demo Channel",
"https://markyp.demo/channel.rss",
"RSS 2.0 example built using markyp-rss.",
language="en-us",
image=Image("markyp-rss RSS 2.0 Demo Channel", "https://markyp.demo/channel.jpeg", "https://markyp.demo/channel.rss"),
ttl=40,
categories=[Category("Demo"), Category("Example")],
items=get_items()
)
)

print(rss)
```

For more details, please have a look at the `markyp_rss.elements` module.

## Community guidelines

In general, please treat each other with respect and follow the below guidelines to interact with the project:

- _Questions, feedback_: Open an issue with a `[Question] ` title.
- _Bug reports_: Open an issue with a `[Bug] ` title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.
- _Feature requests and ideas_: Open an issue with an `[Enhancement] ` title and a clear description of the enhancement proposal.

## Contribution guidelines

Every form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.

Please follow these guidelines to contribute to the project:

- Make sure your changes match the documentation and coding style of the project, including [PEP 484](https://www.python.org/dev/peps/pep-0484/) type annotations.
- `mypy` is used to type-check the codebase, submitted code should not produce typing errors. See [this page](http://mypy-lang.org/) for more information on `mypy`.
- _Small_ fixes can be submitted simply by creating a pull request.
- Non-trivial changes should have an associated [issue](#community-guidelines) in the issue tracker that commits must reference (typically by adding `#refs ` to the end of commit messages).
- Please write [tests](#testing) for the changes you make (if applicable).

If you have any questions about contributing to the project, please contact the project owner.

As mentioned in the [contribution guidelines](#contribution-guidelines), the project is type-checked using `mypy`, so first of all, the project must pass `mypy`'s static code analysis.

The project is tested using `pytest`. The chosen test layout is that tests are outside the application code, see [this page](https://docs.pytest.org/en/latest/goodpractices.html#tests-outside-application-code) for details on what it means in practice.

If `pytest` is installed, the test set can be executed using the `pytest test` command from within the project directory.

If `pytest-cov` is also installed, a test coverage report can be generated by executing `pytest test --cov markyp_rss` from the root directory of the project.

## License - MIT

The library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).