File: example_pyproject.toml

package info (click to toggle)
python-hatch-fancy-pypi-readme 25.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: python: 906; makefile: 3
file content (50 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"


[project]
name = "my-pkg"
version = "1.0"
dynamic = ["readme"]


[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = '''# Level 1 Header

This is *Markdown* in a literal string.

Let's import `AUTHORS.md` without its header and last paragraph next:

'''

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "AUTHORS.md"
start-after = "Authors\n"
end-before = "A full"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """
---

Now let's add an extract from [`tests/example_changelog.md`](https://github.com/hynek/hatch-fancy-pypi-readme/blob/main/tests/example_changelog.md):

"""

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "tests/example_changelog.md"
pattern = "<!-- changelog follows -->\n\n\n(.*?)\n\n## "

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = "\n---\n\nPretty **cool**, huh? ✨"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = "#(\\d+)"
replacement = "[#\\1](https://github.com/hynek/hatch-fancy-pypi-readme/issues/\\1)"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
replacement = '[\1](https://github.com/hynek/hatch-fancy-pypi-readme/tree/main/\g<2>)'