{"id":29945864,"url":"https://github.com/carrotmanmatt/pydowndoc","last_synced_at":"2025-08-03T05:05:54.927Z","repository":{"id":261204608,"uuid":"882870771","full_name":"CarrotManMatt/Pydowndoc","owner":"CarrotManMatt","description":"Rapidly convert your AsciiDoc files to Markdown, using Python","archived":false,"fork":false,"pushed_at":"2025-07-29T12:48:30.000Z","size":520,"stargazers_count":3,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T15:25:37.862Z","etag":null,"topics":["asciidoc","build","converter","documentation","hatch","hatchling","markdown","metadata","packaging","pypi","pyproject-toml","python","readme"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/Pydowndoc","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarrotManMatt.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-04T00:26:15.000Z","updated_at":"2025-07-29T12:48:33.000Z","dependencies_parsed_at":"2024-11-07T01:45:16.321Z","dependency_job_id":"84bf727b-d89f-4ea1-94bc-8d242055e405","html_url":"https://github.com/CarrotManMatt/Pydowndoc","commit_stats":null,"previous_names":["carrotmanmatt/hatch-downdoc-readme","carrotmanmatt/pydowndoc"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/CarrotManMatt/Pydowndoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarrotManMatt%2FPydowndoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarrotManMatt%2FPydowndoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarrotManMatt%2FPydowndoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarrotManMatt%2FPydowndoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarrotManMatt","download_url":"https://codeload.github.com/CarrotManMatt/Pydowndoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarrotManMatt%2FPydowndoc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268496076,"owners_count":24259411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciidoc","build","converter","documentation","hatch","hatchling","markdown","metadata","packaging","pypi","pyproject-toml","python","readme"],"created_at":"2025-08-03T05:02:21.845Z","updated_at":"2025-08-03T05:05:54.912Z","avatar_url":"https://github.com/CarrotManMatt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Pydowndoc\nMatt Norton \u003cmatt@carrotmanmatt.com\u003e\nv1.2, 26/01/2025\n\n:docinfodir: .asciidoctor\n:docinfo: shared\n:project-root: .\n\n:!example-caption:\n:!table-caption:\n:icons: font\n:experimental:\n\n:_url-wikipedia: https://wikipedia.org/wiki\n:_url-github: https://github.com\n:_url-github-wiki: https://docs.github.com\n:_url-pypi: https://pypi.org\n\n:url-project-repository: {_url-github}/CarrotManMatt/Pydowndoc\n:url-project-pypi: {_url-pypi}/project/Pydowndoc\n:url-project-bug-tracker: {url-project-repository}/issues\n:url-python-home: https://python.org\n:url-python: {url-python-home}\n:url-python-download: {url-python-home}/downloads\n:url-python-wiki: https://docs.python.org/3\n:url-python-wiki-virtual-environments: {url-python-wiki}/tutorial/venv\n:url-python-wiki-extras: https://packaging.python.org/en/latest/specifications/dependency-specifiers#extras\n:url-pre-commit-home: https://pre-commit.com\n:url-pre-commit: {url-pre-commit-home}\n:url-ruff-home: https://ruff.rs\n:url-ruff: {url-ruff-home}\n:url-mypy-home: https://mypy-lang.org\n:url-mypy: {url-mypy-home}\n:url-github-wiki-readme: {_url-github-wiki}/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes\n:url-downdoc-repository: {_url-github}/opendevise/downdoc\n:url-wiki-markdown: {_url-wikipedia}/Markdown\n:url-downdoc: {url-downdoc-repository}\n:url-asciidoc-home: https://asciidoc.org\n:url-asciidoc: {url-asciidoc-home}\n:url-asciidoc-asciidoctor: https://asciidoctor.org\n:url-pypi-home: {_url-pypi}\n:url-pypi: https://pypi.org\n:url-hatch-home: https://hatch.pypa.io\n:url-hatch: {url-hatch-home}\n:url-uv-home: https://astral.sh/uv\n:url-uv: {url-uv-home}\n:url-uv-wiki: https://docs.astral.sh/uv\n:url-uv-wiki-tools: {url-uv-wiki}/guides/tools\n:url-uv-wiki-tools-installing: {url-uv-wiki-tools}#installing-tools\n:url-uv-wiki-tools-upgrading: {url-uv-wiki-tools}#upgrading-tools\n:url-uv-wiki-dependencies-adding: {url-uv-wiki}/concepts/projects#managing-dependencies\n:url-pip-home: https://pip.pypa.io\n:url-pip: {url-pip-home}\n\n:labelled-url-python: {url-python}[Python]\n:labelled-url-downdoc: {url-downdoc}[downdoc]\n:labelled-url-asciidoc: {url-asciidoc}[AsciiDoc]\n:labelled-url-wiki-markdown: {url-wiki-markdown}[Markdown]\n:labelled-url-wiki-readme: {url-github-wiki-readme}[README]\n:labelled-url-pypi: {url-pypi}[PyPI]\n:labelled-url-hatch: {url-hatch}[Hatch]\n:labelled-url-pip: {url-pip}[pip]\n:labelled-url-uv: {url-uv}[uv]\n\nimage:https://img.shields.io/badge/%F0%9F%A5%95-Pydowndoc-blue[Pydowndoc,link={url-project-repository}]\nimage:https://img.shields.io/pypi/v/Pydowndoc[PyPI Version,link={url-project-pypi}]\nimage:https://img.shields.io/pypi/pyversions/Pydowndoc?logo=Python\u0026logoColor=white\u0026label=Python[Python Version,link={url-python-download}]\nimage:https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2FCarrotManMatt%2FPydowndoc%2Fmain%2F.github%2Fworkflows%2Fupload-downdoc-binaries.yaml\u0026query=%24.jobs.upload-downdoc-binaries.steps%5B0%5D.with.ref\u0026label=downdoc\u0026logo=asciidoctor[downdoc Version,link={url-downdoc}]\nimage:{url-project-repository}/actions/workflows/check-build-publish.yaml/badge.svg[Tests Status,link={url-project-repository}/actions/workflows/check-build-publish.yaml]\nimage:https://img.shields.io/badge/mypy-checked-%232EBB4E\u0026label=mypy[mypy Status,link={url-mypy}]\nimage:https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit[pre-commit Status,link={url-pre-commit}]\nimage:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json[Ruff,link={url-ruff}]\nimage:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json[uv,link={url-uv}]\n\n****\nRapidly convert your {labelled-url-asciidoc} files to {labelled-url-wiki-markdown}, using {labelled-url-python}\n****\n\nA {labelled-url-python} wrapper around the latest-built binary of {labelled-url-downdoc}; a rapid {labelled-url-asciidoc} to {labelled-url-wiki-markdown} converter.\n\n== Why Use Pydowndoc?\n\n* Run {labelled-url-downdoc} from the CLI within your {url-python-wiki-virtual-environments}[virtual environment]\n* Use {labelled-url-pypi} as the single installation location of your {labelled-url-python} project tooling\n* Use link:pass:macros[pydowndoc/__init__.py][the API] to convert files using your own {labelled-url-python} code/scripts\n* Use the {labelled-url-hatch} plugin to convert your project's README.adoc file to {labelled-url-wiki-markdown}, when building your package\n\n== Installation\n\n.Run as a {url-uv-wiki-tools}[uv tool] (no installation necessary)\n[source,bash]\nuvx --from Pydowndoc-bin -- downdoc --version\n\nTIP: uv will warn you that the `+downdoc+` binary is not directly provided by the `+Pydowndoc[bin]+` package, so we suggest to use `+--from Pydowndoc-bin+` when running downdoc using `+uvx+` or `+uv tool+`.\n\n.Add to your {url-uv-wiki-dependencies-adding}[uv project/script's dependencies]\n[source,bash]\nuv add Pydowndoc[bin]\n\n.{url-uv-wiki-tools-installing}[Install permanently as a uv tool]\n[source,bash]\nuv tool install Pydowndoc-bin\n\n.Install using {labelled-url-pip} after {url-python-wiki-virtual-environments}[creating a virtual environment]\n[source,bash]\npath/to/venv/python -m pip install Pydowndoc[bin]\n\n[#installing-the-downdoc-binary]\n=== Installing the `downdoc` Binary\n\nPydowndoc assumes by default that you wish to use the `+downdoc+` binary already installed on your system (E.g. using your system's package manager).\nInstalling the PyPI package `+Pydowndoc+` will only install the Python compatibility layer for downdoc.\n\nIf you wish to _also_ install the `+downdoc+` https://pypi.org/project/Pydowndoc-bin[binary] itself, please install using the `+[bin]+` {url-python-wiki-extras}[extra].\n\n.Installing *without* the `+[bin]+` extra on a system where `+downdoc+` is not already installed will not work\n[source,console]\n----\n$ uvx --with Pydowndoc python -c \"import pydowndoc; pydowndoc.run()\"\nOSError: The downdoc executable could not be found. Ensure it is installed (E.g `uv add Pydowndoc[bin]`).\n----\n\nNOTE: Once https://peps.python.org/pep-0771[PEP 771] is finalised, the default install will include the `+[bin]+` {url-python-wiki-extras}[extra], and using the `+downdoc+` binary already installed on your system will require opting-out from including the `+[bin]+` {url-python-wiki-extras}[extra].\n\n== CLI Usage\n\n[WARNING]\n--\nThese commands will only work correctly after the `+downdoc+` binary has been installed, either as a system binary or using the `+[bin]+` {url-python-wiki-extras}[extra].\nSee \u003c\u003cinstalling-the-downdoc-binary\u003e\u003e for more information.\n--\n\n.Display the current version number (useful to validate that installation was successful)\n[source,bash]\ndowndoc --version\n\n.Display the help message\n[source,bash]\ndowndoc --help\n\n.Convert a given file (the same filename will be retained, with file-extension changed to `+.md+`)\n[source,bash]\ndowndoc MyNotes.adoc\n\n.Output the converted file to the given filename \u0026 path\n[source,bash]\ndowndoc MyNotes.adoc -o path/to/output.md\n\n.Output the converted file to stdout\n[source,bash]\ndowndoc MyNotes.adoc -o -\n\n.Read the input AsciiDoc file from stdin\n[source,bash]\ncat MyNotes.adoc | downdoc - -o MyNotes.md\n\n== API Usage\n\n.Convert a given file (the same filename will be retained, with file-extension changed to `+.md+`)\n[source,python]\n----\nfrom pathlib import Path\n\nimport pydowndoc\n\npydowndoc.run(Path(\"MyNotes.adoc\"))\n----\n\n.Retrieve the converted file as a string\n[source,python]\n----\nfrom pathlib import Path\n\nimport pydowndoc\n\nconverted_file_contents: str = pydowndoc.run(\n    Path(\"MyNotes.adoc\"),\n    output=\"-\",\n    process_capture_output=True,\n).stdout.decode()\n----\n\n.Ensure the conversion process executes successfully and output the converted file to the given location (by default your code will continue execution even if conversion fails)\n[source,python]\n----\nfrom pathlib import Path\n\nimport pydowndoc\n\npydowndoc.run(\n    Path(\"MyNotes.adoc\"),\n    output=Path(\"path/to/output.md\"),\n    process_check_return_code=True,\n)\n----\n\n== Use as a Hatch build hook\n\n. Ensure the `+readme+` field is added to your `+project.dynamic+` list within your `+pyproject.toml+` file\n+\n[source,toml]\n----\n[project]\nname = \"my-cool-project\"\nversion = \"0.1.0\"\ndynamic = [\"readme\"]\n----\n\n. Set up your build backend, within your `+pyproject.toml+` file, adding `+Pydowndoc[bin]+` as a build dependency\n+\n[source,toml]\n----\n[build-system]\nbuild-backend = \"hatchling.build\"\nrequires = [\"hatchling\", \"Pydowndoc[bin]\"]\n----\n+\nTIP: To prevent issues with users building your package that may not have the `downdoc` binary already installed on their system, we suggest including the `+[bin]+` {url-python-wiki-extras}[extra] in your package's build dependencies.\n\n. Include the hook name within `[tool.hatch.metadata.hooks]` to enable {labelled-url-wiki-readme}-file conversion\n+\n--\n[source,toml]\n----\n[tool.hatch.metadata.hooks.downdoc-readme]\n----\n\nor\n\n[source,toml]\n----\n[tool.hatch.metadata.hooks]\ndowndoc-readme = {}\n----\n--\n\n.. Using a path to a custom {labelled-url-wiki-readme} file\n+\n[source,toml]\n----\n[tool.hatch.metadata.hooks.downdoc-readme]\npath = \"README2.adoc\"\n----\n\n.A full example of a `+pyproject.toml+` file\n[%collapsible]\n====\n[source,toml]\n----\n[project]\nname = \"my-cool-project\"\nversion = \"0.1.0\"\ndynamic = [\"readme\"]\n\n[build-system]\nbuild-backend = \"hatchling.build\"\nrequires = [\"hatchling\", \"Pydowndoc[bin]\"]\n\n[tool.hatch.metadata.hooks.downdoc-readme]\npath = \"README2.adoc\"\n----\n====\n\n=== Configuration Options\n\n[cols=\"1,1,1,3\"]\n|===\n|Option |Type |Default |Description\n\n|`+path+`\n|`+str+`\n|`+README.adoc+`\n|The location of your AsciiDoc to be converted to {labelled-url-wiki-markdown}, to be used as the project's {labelled-url-wiki-readme} file\n|===\n\n== Upgrading\n\n.If {url-uv-wiki-tools-upgrading}[installed as a uv tool]\n[source,bash]\nuv tool upgrade Pydowndoc-bin\n\n.If added as a {url-uv-wiki-dependencies-adding}[uv project dependency]\n[source,bash]\nuv sync --upgrade-package Pydowndoc\n\n.If installed using {labelled-url-pip}\n[source,bash]\npath/to/venv/python -m pip install --upgrade Pydowndoc\n\n== Uninstallation\n\n.If added as a {url-uv-wiki-dependencies-adding}[uv project dependency]\n[source,bash]\nuv remove Pydowndoc\n\n.If installed as a {url-uv-wiki-tools}[uv tool]\n[source,bash]\nuv tool uninstall Pydowndoc-bin\n\n.If installed with {labelled-url-pip}\n[source,bash]\npath/to/venv/python -m pip uninstall Pydowndoc\n\n== Reporting Issues\n\nIf there are issues with the Python API for this package, or you are encountering installation problems, please report these on {url-project-bug-tracker}[the GitHub issues tracker for this project].\n\nIf you have problems with the conversion process of your AsciiDoc files to Markdown, please report these {url-downdoc-repository}/issues[upstream], directly to the {url-downdoc}[downdoc project].\n\n=== Windows \u0026 macOS Wheels\n\nWindows and macOS wheels are provided to enable use of this project on non-linux hosts.\nHowever, these versions have not had the same level of testing as the linux version.\nTherefore, if you encounter any bugs with these other versions, report them on {url-project-bug-tracker}[the GitHub issues tracker for this project].\n\n== Licencing\n\nThe compiled binary of the distributed downdoc software is shared under the MIT licence as described in {url-downdoc-repository}?tab=MIT-1-ov-file#readme[the upstream project's licence file].\n\nAll other code in this project is distrubuted under link:./LICENSE[the Apache-2.0 licence].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarrotmanmatt%2Fpydowndoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarrotmanmatt%2Fpydowndoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarrotmanmatt%2Fpydowndoc/lists"}