{"id":21845168,"url":"https://github.com/hellt/pymdownx-block-converter","last_synced_at":"2025-03-21T16:27:19.130Z","repository":{"id":212483847,"uuid":"731591124","full_name":"hellt/pymdownx-block-converter","owner":"hellt","description":"Moving your markdown files to the new Block syntax","archived":false,"fork":false,"pushed_at":"2025-02-19T07:55:31.000Z","size":19,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-19T15:06:34.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hellt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-12-14T12:27:20.000Z","updated_at":"2025-03-15T17:29:32.000Z","dependencies_parsed_at":"2023-12-14T14:25:15.003Z","dependency_job_id":"6b88d2e8-c925-45fd-921c-6991c7f37482","html_url":"https://github.com/hellt/pymdownx-block-converter","commit_stats":null,"previous_names":["hellt/pymdowx-block-converter","hellt/pymdownx-block-converter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fpymdownx-block-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fpymdownx-block-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fpymdownx-block-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fpymdownx-block-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellt","download_url":"https://codeload.github.com/hellt/pymdownx-block-converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244828099,"owners_count":20517054,"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":[],"created_at":"2024-11-27T23:07:10.700Z","updated_at":"2025-03-21T16:27:19.124Z","avatar_url":"https://github.com/hellt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pymdownx-block-converter\n\nPyMdown Extension v9.10+ introduces a new way to define\n[blocks](https://facelessuser.github.io/pymdown-extensions/extensions/blocks/),\nwhich you might know under the following names:\n\n* admonitions\n* details\n* tabs\n\nThe new syntax improves the readability of the Markdown source and allows for\nmore flexibility. However, you might already have a lot of Markdown files that\nuse the old syntax.\n\nThis repo contains a [script](main.py) created by [@tiangolo](https://github.com/tiangolo)\nto update Markdown block syntax (per [sqlmodel#712](https://github.com/fastapi/sqlmodel/pull/712)\n, [sqlmodel#713](https://github.com/fastapi/sqlmodel/pull/713), and\n[pymdown-extensions#1973](https://github.com/facelessuser/pymdown-extensions/discussions/1973)\n). Additionally, this script is packaged in a container allowing conversion from\nthe old block syntax to the new one across your entire documentation base or\njust a single file.\n\n## Supported Syntax\n\n* Admonitions declared with `!!!`\n  * including those with varied spacing around the _type_\n* Details declared with HTML tags\n  * with and without \u0026lt;summary/\u003e tags\n* Details declared with `???`, including the open attribute with `???+`\n  * again, with and without a summary\n* Tabs with `===`\n\n**Limitations**:\n\n1. The script doesn't handle **nested** tabs conversion at this moment.\n\n## Usage\n\nIt is always a good idea to first run the script against a single file to see if\nit works as expected.\n\n:sparkles: To do so, first determine whether to run the container or locally run\nthe script:\n\n### Container\n\n```bash\nsudo docker run --rm -v $(pwd)/path/to/file.md:/docs/test.md \\\n     ghcr.io/hellt/pymdownx-block-converter:0.1.0\n```\n\nTo convert the whole documentation base that is typically contained in the\n`docs` folder, run the following command:\n\n```bash\nsudo docker run --rm -v $(pwd)/docs:/docs \\\n     ghcr.io/hellt/pymdownx-block-converter:0.1.0\n```\n\n### Local Execution outside of container\n\nLocal execution against a file:\n\n```bash\npython block_conv.py /path/to/test.md\n```\n\nLocal execution against a directory (utilizes globbing):\n\n```bash\npython block_conv.py /path/to/\n```\n\nRunning the script without a file or path argument runs against *.md in\n_/docs_ (to remain backwards compatible with the container's Dockerfile).\n\n```bash\npython block_conv.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fpymdownx-block-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellt%2Fpymdownx-block-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fpymdownx-block-converter/lists"}