{"id":19564454,"url":"https://github.com/u8slvn/markdownio","last_synced_at":"2025-04-27T00:32:59.153Z","repository":{"id":57439684,"uuid":"247656771","full_name":"u8slvn/markdownio","owner":"u8slvn","description":"Python tool to write Markdown as code easily.","archived":false,"fork":false,"pushed_at":"2024-01-11T08:10:09.000Z","size":71,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T01:55:45.854Z","etag":null,"topics":["markdown","markdown-builder","python","python-markdown"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/u8slvn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-16T09:09:26.000Z","updated_at":"2022-07-06T08:49:43.000Z","dependencies_parsed_at":"2024-11-11T05:24:50.433Z","dependency_job_id":"349c6318-33e6-480c-8b35-40398196bc7e","html_url":"https://github.com/u8slvn/markdownio","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"7ccf99965892a584923c5a6d10e0d85b03927ea2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8slvn%2Fmarkdownio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8slvn%2Fmarkdownio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8slvn%2Fmarkdownio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8slvn%2Fmarkdownio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u8slvn","download_url":"https://codeload.github.com/u8slvn/markdownio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251073596,"owners_count":21532005,"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","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":["markdown","markdown-builder","python","python-markdown"],"created_at":"2024-11-11T05:22:06.537Z","updated_at":"2025-04-27T00:32:58.872Z","avatar_url":"https://github.com/u8slvn.png","language":"Python","readme":"# MarkdownIO\n\n[![Pypi Version](https://img.shields.io/pypi/v/markdownio.svg)](https://pypi.org/project/markdownio/)\n[![Python Version](https://img.shields.io/pypi/pyversions/markdownio)](https://pypi.org/project/markdownio/)\n[![CI](https://github.com/u8slvn/markdownio/actions/workflows/ci.yml/badge.svg)](https://github.com/u8slvn/markdownio/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/u8slvn/markdownio/badge.svg?branch=master)](https://coveralls.io/github/u8slvn/markdownio?branch=master)\n[![Project license](https://img.shields.io/pypi/l/markdownio)](https://pypi.org/project/markdownio/)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nPython tool to write Markdown as code easily.\n\n## Installation\n\n```sh\n$ pip install markdownio\n```\n\n## Usage\n\n```python\nfrom markdownio import MarkdownIO, span\nfrom markdownio.block import TableHeader\n\nmarkdown = MarkdownIO()\n\nmarkdown.h1(\"My test document\")\nmarkdown.p(\n    text=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. \"\n         \"Vivamus rutrum consequat \" + span.bold(\"odio\") + \" et mollis.\"\n)\nmarkdown.p(span.image(path=\"path/img.jpg\", alt=\"img\", title=\"img\"))\nmarkdown.table(\n    columns=3,\n    headers=['Col1', 'Col2', TableHeader.center('Col3')],\n    rows=[\n        ['foo', 'bar', 'foobar'],\n        ['oof', 'rab', 2000],\n    ]\n)\nmarkdown.p(\n    text=\"This is an interesting article: \" + span.link(path='http://test.io')\n)\nmarkdown.h2(\"Code example\")\nmarkdown.code(text='\u003cp\u003eTest\u003c/p\u003e', language='html')\n\nprint(markdown.output())\n```\n\noutput:\n\n~~~markdown\n# My test document\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus rutrum consequat **odio** et mollis. p\n![img](path/img.jpg \"img\")\n\n| Col1 | Col2 | Col3   |\n| ---- | ---- | :----: |\n| foo  | bar  | foobar |\n| oof  | rab  | 2000   |\n\nThis is an interesting article: \u003chttp://test.io\u003e\n\n## Code example\n\n```html\n\u003cp\u003eTest\u003c/p\u003e\n```\n~~~\n\n## Merge two documents\n\n```python\nfrom markdownio import MarkdownIO\n\ndocument1 = MarkdownIO()\ndocument1.p(\"Part 1.\")\n\ndocument2 = MarkdownIO()\ndocument2.p(\"Part 2.\")\n\nfull_document = document1 + document2\nprint(full_document.output())\n```\n\noutput:\n\n```markdown\nPart 1.\n\nPart 2.\n```\n\n## Documentation\n\n- [Block elements](./documentation/block.md)\n- [Span elements](./documentation/span.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8slvn%2Fmarkdownio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu8slvn%2Fmarkdownio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8slvn%2Fmarkdownio/lists"}