mirror of
https://github.com/Paillat-dev/discord-progress-bar.git
synced 2026-01-02 01:06:18 +00:00
Add support for hatch-fancy-pypi-readme in pyproject.toml
This update integrates `hatch-fancy-pypi-readme` to enhance PyPI package descriptions using fragments and substitutions. Adjustments include dynamic readme handling and metadata hooks for better customization of content. Updated the README table of contents to include new sections.
This commit is contained in:
@@ -32,9 +32,13 @@ Discord bot messages.
|
|||||||
- [Different Progress Bar States](#different-progress-bar-states)
|
- [Different Progress Bar States](#different-progress-bar-states)
|
||||||
- [Custom Progress Bar Length](#custom-progress-bar-length)
|
- [Custom Progress Bar Length](#custom-progress-bar-length)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
|
- [Bot Configuration](#bot-configuration)
|
||||||
|
- [Progress Bar Manager Initialization](#progress-bar-manager-initialization)
|
||||||
|
- [Custom Progress Bar Styles](#custom-progress-bar-styles)
|
||||||
- [Limitations](#limitations)
|
- [Limitations](#limitations)
|
||||||
- [Getting Help](#getting-help)
|
- [Getting Help](#getting-help)
|
||||||
- [Development](#development)
|
- [Development](#development)
|
||||||
|
- [Local Testing](#local-testing)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling", "hatch-vcs"]
|
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "discord-progress-bar"
|
name = "discord-progress-bar"
|
||||||
dynamic = ["version", "urls"]
|
dynamic = ["version", "urls", "readme"]
|
||||||
description = "A python library to easily create progress bars with discord emojis"
|
description = "A python library to easily create progress bars with discord emojis"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
@@ -45,6 +45,34 @@ version-file = "src/discord_progress_bar/_version.py"
|
|||||||
Homepage = "https://github.com/Paillat-dev/discord-progress-bar"
|
Homepage = "https://github.com/Paillat-dev/discord-progress-bar"
|
||||||
source_archive = "https://github.com/Paillat-dev/discord-progress-bar/archive/{commit_hash}.zip"
|
source_archive = "https://github.com/Paillat-dev/discord-progress-bar/archive/{commit_hash}.zip"
|
||||||
|
|
||||||
|
[tool.hatch.metadata.hooks.fancy-pypi-readme]
|
||||||
|
content-type = "text/markdown"
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
|
||||||
|
path = "README.md"
|
||||||
|
start-after = "<!-- badges -->\n"
|
||||||
|
end-before = "\n<!-- end badges -->"
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
|
||||||
|
text = "\n\n---\n"
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
|
||||||
|
path = "README.md"
|
||||||
|
start-after = "## Overview\n"
|
||||||
|
end-before = "\n## Installation"
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
|
||||||
|
path = "README.md"
|
||||||
|
start-after = "<!-- quick-start -->"
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
|
||||||
|
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
|
||||||
|
replacement = '[\1](https://github.com/Paillat-dev/discord-progress-bar/tree/main\g<2>)'
|
||||||
|
|
||||||
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
|
||||||
|
pattern = '\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]'
|
||||||
|
replacement = '**\1**:'
|
||||||
|
|
||||||
[tool.hatchling]
|
[tool.hatchling]
|
||||||
name = "discord-progress-bar"
|
name = "discord-progress-bar"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user