diff --git a/README.md b/README.md index fc25e65..367811b 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,13 @@ Discord bot messages. - [Different Progress Bar States](#different-progress-bar-states) - [Custom Progress Bar Length](#custom-progress-bar-length) - [Configuration](#configuration) + - [Bot Configuration](#bot-configuration) + - [Progress Bar Manager Initialization](#progress-bar-manager-initialization) + - [Custom Progress Bar Styles](#custom-progress-bar-styles) - [Limitations](#limitations) - [Getting Help](#getting-help) - [Development](#development) + - [Local Testing](#local-testing) - [Contributing](#contributing) - [License](#license) diff --git a/pyproject.toml b/pyproject.toml index 4e0430a..33964dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["hatchling", "hatch-vcs"] +requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" [project] name = "discord-progress-bar" -dynamic = ["version", "urls"] +dynamic = ["version", "urls", "readme"] description = "A python library to easily create progress bars with discord emojis" readme = "README.md" authors = [ @@ -45,6 +45,34 @@ version-file = "src/discord_progress_bar/_version.py" Homepage = "https://github.com/Paillat-dev/discord-progress-bar" 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 = "\n" +end-before = "\n" + +[[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 = "" + +[[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] name = "discord-progress-bar"