Skip to main content

Preprocessor for Foliant for generating history of releases.

Project description

History

History is a preprocessor that generates single linear history of releases for multiple Git repositories based on their changelogs. The history may be represented as Markdown, and as RSS feed.

Installation

$ pip install foliantcontrib.history

Config

To enable the preprocessor, add history to preprocessors section in the project config:

preprocessors:
    - history

The preprocessor has a number of options with the following default values:

- history:
    repos: []
    revision: master
    changelog: changelog.md
    source_heading_level: 1
    target_heading_level: 1
    date_format: year_first
    link: false
    limit: 0
    rss: false
    rss_file: rss.xml
    rss_title: History of Releases
    rss_link: ''
    rss_description: ''
    rss_language: en-US

repos : List of URLs of Git repositories that it’s necessary to generate history for.

Example:

```yaml
repos:
    - https://github.com/foliant-docs/foliant.git
    - https://github.com/foliant-docs/foliantcontrib.includes.git
```

revision : Revision or branch name to use. Branches that are used for stable releases must have the same names in all listed repositories.

changelog : Path to changelog file. Changelogs must be located at the same paths in all listed repositories.

source_heading_level : Level of headings that precede descriptions of releases in the source Markdown content. It must be the same for all listed repositories.

target_heading_level : Level of headings that precede descriptions of releases in the target Markdown content of generated history.

date_format : Output date format to use in the target Markdown content. If the default value year_first is used, the date “September 4, 2019” will be represented as 2019-09-04. If the day_first value is used, this date will be represented as 04.09.2019.

link : Flag that tells the preprocessor to add the link to the repository to each heading of history item in the target Markdown content.

limit : Maximum number of items to include into the target Markdown content; 0 means no limit.

rss : Flag that tells the preprocessor to export the history into RSS feed. Note that the parameters target_heading_level, date_format, link, and limit are applied to Markdown content only, not to RSS feed content.

rss_file : Subpath to the file with RSS feed. It’s relative to the temporary working directory during building, to the directory of built project after building, and to the rss_link value in URLs.

rss_title : RSS channel title.

rss_link : RSS channel link, e.g. https://foliant-docs.github.io/docs/. If the rss parameter value is rss.xml, the RSS feed URL will be https://foliant-docs.github.io/docs/rss.xml.

rss_description : RSS channel description.

rss_language : RSS channel language.

Usage

To insert some history into Markdown content, use the <<history></history> tags:

Some optional content here.

<<history></history>

More optional content.

If no attributes specified, the values of options from the project config will be used.

You may override each config option value with the attribute of the same name. Example:

<<history
    repos="https://github.com/foliant-docs/foliantcontrib.mkdocs.git"
    revision="develop"
    link="true"
    limit="5"
    rss="true"
    rss_file="some_another.xml"
    ...
>
</history>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foliantcontrib.history-1.0.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

foliantcontrib.history-1.0.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file foliantcontrib.history-1.0.3.tar.gz.

File metadata

  • Download URL: foliantcontrib.history-1.0.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for foliantcontrib.history-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1013531caeef207f65752daaea362d751a44a1675b27c006ed26682617034f51
MD5 ba367b2a704e3242b21ec59a06dd44fd
BLAKE2b-256 c1c5aca2bd4edd7be8551e57fea7541249fb15bc918a3e0b88d88e5b75a15f17

See more details on using hashes here.

File details

Details for the file foliantcontrib.history-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: foliantcontrib.history-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for foliantcontrib.history-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc6db9c7428abaa265cbe37a9a8144311f13b6c25dbe462f59843e6227bc5530
MD5 404380fd41271d53a87c09b1511dfa90
BLAKE2b-256 d7a247989bad6ad4b1873e9a75d3b68c29276c55e35ffb28f729314095a3642b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page