{ "cells": [ { "cell_type": "markdown", "id": "2b18a9ed-d214-4164-84f8-01842428781c", "metadata": {}, "source": [ "# Atlassian Document Format Parser\n", "\n", "## What is ADF?\n", "\n", "[Atlassian Document Format (ADF)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) is the rich text storage format used across Atlassian products:\n", "\n", "- **Confluence** - Page content\n", "- **Jira** - Issue descriptions, comments, and rich text custom fields\n", "\n", "ADF stores formatted content as structured JSON. This library parses that JSON into Python objects and converts it to Markdown - making Atlassian content accessible to LLMs and AI systems.\n", "\n", "## Installation\n", "\n", "```bash\n", "pip install atlas-doc-parser\n", "```\n", "\n", "## Core Use Case: ADF to Markdown\n", "\n", "The primary use case is extracting content from Confluence/Jira and converting it to Markdown for AI consumption.\n", "\n", "### Step 1: Get ADF JSON from Atlassian API\n", "\n", "When you fetch a Confluence page or Jira issue via their REST APIs, you receive ADF JSON (See https://github.com/MacHu-GWU/atlas_doc_parser-project/releases/download/0.1.1/example.json):" ] }, { "cell_type": "code", "execution_count": 11, "id": "cb3bda88-293a-440c-9422-ebf379f75708", "metadata": {}, "outputs": [], "source": [ "import json\n", "import httpx\n", "\n", "url = \"https://github.com/MacHu-GWU/atlas_doc_parser-project/releases/download/0.1.1/example.json\"\n", "data = json.loads(httpx.get(url, follow_redirects=True).text)" ] }, { "cell_type": "markdown", "id": "3862c528-68b7-49ae-a4f1-d6ae4dd5f0f2", "metadata": {}, "source": [ "### Step 2: Parse to Object" ] }, { "cell_type": "code", "execution_count": 16, "id": "f4540db7-f1d3-46d3-961e-eab0837a4a3c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
NodeDoc(type='doc', version=1, content=[NodeParagraph(type='paragraph', \n",
       "attrs=NodeParagraphAttrs(localId='442ee6f7-e9df-4d30-9416-3a8c0021bd89'), content=[NodeText(type='text', text='This\n",
       "document is purposely built for creating a software to parse Atlassian Document Format JSON.', marks=OPT)], \n",
       "marks=OPT), NodeParagraph(type='paragraph', \n",
       "attrs=NodeParagraphAttrs(localId='4a20e3ed-cdde-4982-af22-edbddd6e5901'), content=[NodeText(type='text', text='This\n",
       "is a table of content', marks=OPT)], marks=OPT), NodeExtension(type='extension', \n",
       "attrs=NodeExtensionAttrs(extensionKey='toc', extensionType='com.atlassian.confluence.macro.core', \n",
       "parameters={'macroParams': {'style': {'value': 'none'}}, 'macroMetadata': {'macroId': {'value': \n",
       "'5f7acfc6-f813-486f-b4a0-38d519c0d263'}, 'schemaVersion': {'value': '1'}, 'title': 'Table of Contents'}}, text=OPT,\n",
       "layout='default', localId='0affa059-1fad-4b40-8896-702b7bb16ecb'), marks=OPT), NodeHeading(type='heading', \n",
       "attrs=NodeHeadingAttrs(level=1, localId='43c95...\n",
       "
\n" ], "text/plain": [ "\u001b[1;35mNodeDoc\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'doc'\u001b[0m, \u001b[33mversion\u001b[0m=\u001b[1;36m1\u001b[0m, \u001b[33mcontent\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;35mNodeParagraph\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'paragraph'\u001b[0m, \n", "\u001b[33mattrs\u001b[0m=\u001b[1;35mNodeParagraphAttrs\u001b[0m\u001b[1m(\u001b[0m\u001b[33mlocalId\u001b[0m=\u001b[32m'442ee6f7-e9df-4d30-9416-3a8c0021bd89'\u001b[0m\u001b[1m)\u001b[0m, \u001b[33mcontent\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;35mNodeText\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'text'\u001b[0m, \u001b[33mtext\u001b[0m=\u001b[32m'This\u001b[0m\n", "\u001b[32mdocument is purposely built for creating a software to parse Atlassian Document Format JSON.'\u001b[0m, \u001b[33mmarks\u001b[0m=\u001b[35mOPT\u001b[0m\u001b[1m)\u001b[0m\u001b[1m]\u001b[0m, \n", "\u001b[33mmarks\u001b[0m=\u001b[35mOPT\u001b[0m\u001b[1m)\u001b[0m, \u001b[1;35mNodeParagraph\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'paragraph'\u001b[0m, \n", "\u001b[33mattrs\u001b[0m=\u001b[1;35mNodeParagraphAttrs\u001b[0m\u001b[1m(\u001b[0m\u001b[33mlocalId\u001b[0m=\u001b[32m'4a20e3ed-cdde-4982-af22-edbddd6e5901'\u001b[0m\u001b[1m)\u001b[0m, \u001b[33mcontent\u001b[0m=\u001b[1m[\u001b[0m\u001b[1;35mNodeText\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'text'\u001b[0m, \u001b[33mtext\u001b[0m=\u001b[32m'This\u001b[0m\n", "\u001b[32mis a table of content'\u001b[0m, \u001b[33mmarks\u001b[0m=\u001b[35mOPT\u001b[0m\u001b[1m)\u001b[0m\u001b[1m]\u001b[0m, \u001b[33mmarks\u001b[0m=\u001b[35mOPT\u001b[0m\u001b[1m)\u001b[0m, \u001b[1;35mNodeExtension\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'extension'\u001b[0m, \n", "\u001b[33mattrs\u001b[0m=\u001b[1;35mNodeExtensionAttrs\u001b[0m\u001b[1m(\u001b[0m\u001b[33mextensionKey\u001b[0m=\u001b[32m'toc'\u001b[0m, \u001b[33mextensionType\u001b[0m=\u001b[32m'com.atlassian.confluence.macro.core'\u001b[0m, \n", "\u001b[33mparameters\u001b[0m=\u001b[1m{\u001b[0m\u001b[32m'macroParams'\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m'style'\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m'value'\u001b[0m: \u001b[32m'none'\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m'macroMetadata'\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m'macroId'\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m'value'\u001b[0m: \n", "\u001b[32m'5f7acfc6-f813-486f-b4a0-38d519c0d263'\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m'schemaVersion'\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m'value'\u001b[0m: \u001b[32m'1'\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m'title'\u001b[0m: \u001b[32m'Table of Contents'\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \u001b[33mtext\u001b[0m=\u001b[35mOPT\u001b[0m,\n", "\u001b[33mlayout\u001b[0m=\u001b[32m'default'\u001b[0m, \u001b[33mlocalId\u001b[0m=\u001b[32m'0affa059-1fad-4b40-8896-702b7bb16ecb'\u001b[0m\u001b[1m)\u001b[0m, \u001b[33mmarks\u001b[0m=\u001b[35mOPT\u001b[0m\u001b[1m)\u001b[0m, \u001b[1;35mNodeHeading\u001b[0m\u001b[1m(\u001b[0m\u001b[33mtype\u001b[0m=\u001b[32m'heading'\u001b[0m, \n", "\u001b[33mattrs\u001b[0m=\u001b[1;35mNodeHeadingAttrs\u001b[0m\u001b[1m(\u001b[0m\u001b[33mlevel\u001b[0m=\u001b[1;36m1\u001b[0m, \u001b[33mlocalId\u001b[0m='43c95\u001b[33m...\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from atlas_doc_parser.api import NodeDoc\n", "from rich import print as rprint\n", "\n", "doc = NodeDoc.from_dict(data)\n", "rprint(str(doc)[:1000] + \"...\")" ] }, { "cell_type": "markdown", "id": "899e6a71-1424-441d-a3d2-d14100c4d953", "metadata": {}, "source": [ "### Step 3: Convert to Markdown Then Give it to AI" ] }, { "cell_type": "code", "execution_count": 19, "id": "1446b9ea-ba44-4319-8087-d592fdef7dd2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This document is purposely built for creating a software to parse Atlassian Document Format JSON.\n", "\n", "This is a table of content\n", "\n", "[Extension: com.atlassian.confluence.macro.core/toc]\n", "\n", "# Text and Paragraph\n", "\n", "## Text and Paragraph 28d8c0\n", "\n", "This is a simple sentence 761ec2.\n", "\n", "This is a simple sentence 17adc1.\n", "\n", "This is a simple sentence 9c9c4f, there is a empty line above this.\n", "\n", "This is a simple paragraph c3f610, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph.\n", "\n", "This is a simple paragraph 9af9a0, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph.\n", "\n", "This is a simple paragraph ff2fa6, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, there is a empty line above this.\n", "\n", "## Text Style and Format e0dfeb\n", "\n", "This is a **bolded text**, do you see that?\n", "\n", "This is a *italic text*, do you see that?\n", "\n", "This is a underline, do you see that?\n", "\n", "This is a ~~strike through~~, do you see that?\n", "\n", "This is a ***~~bolded itlic strike through and underline~~***, do you see that?\n", "\n", "This is a subscript, do you see that?\n", "\n", "This is a superscript, do you see that?\n", "\n", "This text has color, do you see that?\n", "\n", "This text has background, do you see that?\n", "\n", "Note that you can not do Text color and Background color at the same time.\n", "\n", "This line has code `` a = 1 + 2 ``**.**\n", "\n", "## Hyper Link\n", "\n", "This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "\n", "This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) \n", "\n", "This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) \n", "\n", "This line has card hyperlink \n", "\n", "[https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "This line has emoji 📝 .\n", "\n", "This line at @machu for something.\n", "\n", "# Bullet List b2abc0\n", "\n", "## Simple Bullet List\n", "\n", "bullet list 1 a50f00\n", "\n", "- item 1\n", "- item 2\n", "- item 3\n", "\n", "- bullet list 2 item 1 (there is an empty line above this between this and the previous bullet list)\n", "- bullet list 2 item 2\n", "- bullet list 2 item 3\n", "\n", "## Bullet List with Format\n", "\n", "bullet list 1 944782\n", "\n", "- this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.\n", "- This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "- This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "- This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "## Nested Bullet List\n", "\n", "bullet list 1 c5e045\n", "\n", "- **item** 1\n", "- item 2\n", "- `` item `` 3\n", " - [item](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) 3.1\n", " - item 3.1.1\n", " - item 3.1.2\n", " - item 3.2\n", " - item 3.2.1\n", " - item 3.2.2\n", "\n", "# Ordered List 639d5a\n", "\n", "## Simple Ordered List\n", "\n", "Ordered list 1 e7bd58\n", "\n", "1. Alice\n", "2. Bob\n", "3. Cathy\n", "\n", "1. Ordered list 2 item 1 (there is an empty line above this between this and the previous bullet list)\n", "2. Ordered list 2 item 2\n", "3. Ordered list 2 item 3\n", "\n", "## Ordered List With Format\n", "\n", "ordered list 1 fd02cb\n", "\n", "11. this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.\n", "12. This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "13. This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "14. This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "## Nested Ordered List\n", "\n", "ordered list 1 eb58ef\n", "\n", "1. Alice\n", "2. Bob\n", "3. Cathy\n", " 1. Cathy 1\n", " 1. Cathy 1.1\n", " 2. Cathy 1.2\n", " 2. Cathy 2\n", " 1. Cathy 2.1\n", " 2. Cathy 2.2\n", "\n", "# Task List 4141f8\n", "\n", "## Nested Task List\n", "\n", "task list 1 e5461d\n", "\n", "- [x] Do this\n", "- [ ] And do **this**\n", " - [ ] sub `` task `` 1\n", " - [x] sub task 1.1\n", " - [ ] sub ~~task~~ 1.2\n", " - [ ] sub **task** 2\n", " - [ ] sub task 2.1\n", " - [x] sub task 2.2\n", "\n", "# Code Block 3d7d7e \n", "\n", "This is a code block\n", "\n", "```\n", "> Hello world\n", "```\n", "\n", "This is a Python code block\n", "\n", "```python\n", "def add_two(a, b):\\n return a + b\n", "```\n", "\n", "# Image 75c648\n", "\n", "This is an image\n", "\n", "![media](https://www.python.org/static/img/python-logo.png)\n", "This is an image with alt text\n", "\n", "![Python Logo](https://www.python.org/static/img/python-logo.png)\n", "This is an image with clickable link\n", "\n", "[![media](https://www.python.org/static/img/python-logo.png)](https://www.python.org/)\n", "This is an image with capital and clickable link\n", "\n", "[![Python Logo](https://www.python.org/static/img/python-logo.png)](https://www.python.org/)\n", "\n", "# Table 8cb9f1\n", "\n", "## Simple Table 69b8c4\n", "\n", "simple table 1\n", "\n", "| **name**
| **age**
|\n", "| --- | --- |\n", "| Alice
| 20
|\n", "| Bob
| 35
|\n", "\n", "## Multiline Content Table 51e9b3\n", "\n", "multiline content table 1\n", "\n", "| **Col 1**
| **Col 2**
|\n", "| --- | --- |\n", "| key 1
special character \\| is not markdown friendly
| value 1
- this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.
- This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).
- This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)
- This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) |\n", "| key 2
special character \\| is not markdown friendly
| value 2
1. Alice
2. Bob
3. Cathy
    1. Cathy 1
        1. Cathy 1.1
        2. Cathy 1.2
    2. Cathy 2
        1. Cathy 2.1
        2. Cathy 2.2 |\n", "| key 3
special character \\| is not markdown friendly
| value 3
- [x] Do this
- [ ] And do **this**
    - [ ] sub `` task `` 1
        - [x] sub task 1.1
        - [ ] sub ~~task~~ 1.2
    - [ ] sub **task** 2
        - [ ] sub task 2.1
        - [x] sub task 2.2 |\n", "\n", "# Expand 0479c0\n", "\n", "This is a expandable container\n", "\n", "this is expand content\n", "\n", "- bullet 1 in expand content\n", "- bullet 2 in expand content\n", "- bullet 3 in expand content\n", "\n", "> Quote something here in expand content\n", "\n", "end of expand content\n", "\n", "# Quote 08e36f\n", "\n", "## Simple Quote 84378f\n", "\n", "simple quote 1\n", "\n", "> Alice says:\n", "> \n", "> Just do it!\n", "\n", "## Quote as Container b644da\n", "\n", "quote as container 1\n", "\n", "> This is a one line paragraph. Text may have **bold**, *italic*, underscore, ~~strike through~~, [hyperlink](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) and more.\n", "> \n", "> This is a bullet list\n", "> \n", "> - bullet 1 in quote\n", "> - bullet 2 in quote\n", "> \n", "> Code block in quote\n", "> \n", "> Start\n", "> \n", "> ```python\n", "> def mul_two(a, b):\\n return a * b\n", "> ```\n", "> \n", "> End\n", "\n", "# Panel 8c4bed\n", "\n", "This is an info\n", "\n", "> **INFO**\n", "> \n", "> Info here\n", "> \n", "> This is a one line paragraph. Text may have **bold**, *italic*, underscore, ~~strike through~~, [hyperlink](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) and more.\n", "> \n", "> This is a bullet list\n", "> \n", "> - bullet 1 in panel\n", "> - bullet 2 in panel\n", "> \n", "> Code block in quote\n", "> \n", "> Start\n", "> \n", "> ```python\n", "> def mul_two(a, b):\\n return a * b\n", "> ```\n", "> \n", "> End\n", "\n", "This is a note\n", "\n", "> **NOTE**\n", "> \n", "> Note here\n", "\n", "This is a success\n", "\n", "> **SUCCESS**\n", "> \n", "> Success here\n", "\n", "This is a warning\n", "\n", "> **WARNING**\n", "> \n", "> Warning here\n", "\n", "This is a error\n", "\n", "> **ERROR**\n", "> \n", "> Error here\n", "\n", "This is a custom emoji\n", "\n", "> **CUSTOM**\n", "> \n", "> Custom emoji info here\n", "\n", "This is an decision\n", "\n", "> Decision title\n", "> decision body here\n", "> - alice\n", "> - bob\n", "> - cathy\n", ">\n", "> This is pure text only\n", "This is an Date\n", "\n", "2025-01-01 \n", "\n", "This is a status\n", "\n", "`In Progress` \n", "\n", "This is a devider\n", "\n", "---\n", "\n", "## 1.1 Header 2\n", "\n", "### 1.1.1 Header 3\n", "\n", "\n" ] } ], "source": [ "md = doc.to_markdown()\n", "print(md)" ] }, { "cell_type": "code", "execution_count": 20, "id": "6100dbdc-7be9-4e2d-baf4-84cf0133aacc", "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "This document is purposely built for creating a software to parse Atlassian Document Format JSON.\n", "\n", "This is a table of content\n", "\n", "[Extension: com.atlassian.confluence.macro.core/toc]\n", "\n", "# Text and Paragraph\n", "\n", "## Text and Paragraph 28d8c0\n", "\n", "This is a simple sentence 761ec2.\n", "\n", "This is a simple sentence 17adc1.\n", "\n", "This is a simple sentence 9c9c4f, there is a empty line above this.\n", "\n", "This is a simple paragraph c3f610, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph.\n", "\n", "This is a simple paragraph 9af9a0, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph.\n", "\n", "This is a simple paragraph ff2fa6, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, This is a simple paragraph, there is a empty line above this.\n", "\n", "## Text Style and Format e0dfeb\n", "\n", "This is a **bolded text**, do you see that?\n", "\n", "This is a *italic text*, do you see that?\n", "\n", "This is a underline, do you see that?\n", "\n", "This is a ~~strike through~~, do you see that?\n", "\n", "This is a ***~~bolded itlic strike through and underline~~***, do you see that?\n", "\n", "This is a subscript, do you see that?\n", "\n", "This is a superscript, do you see that?\n", "\n", "This text has color, do you see that?\n", "\n", "This text has background, do you see that?\n", "\n", "Note that you can not do Text color and Background color at the same time.\n", "\n", "This line has code `` a = 1 + 2 ``**.**\n", "\n", "## Hyper Link\n", "\n", "This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "\n", "This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) \n", "\n", "This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) \n", "\n", "This line has card hyperlink \n", "\n", "[https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "This line has emoji 📝 .\n", "\n", "This line at @machu for something.\n", "\n", "# Bullet List b2abc0\n", "\n", "## Simple Bullet List\n", "\n", "bullet list 1 a50f00\n", "\n", "- item 1\n", "- item 2\n", "- item 3\n", "\n", "- bullet list 2 item 1 (there is an empty line above this between this and the previous bullet list)\n", "- bullet list 2 item 2\n", "- bullet list 2 item 3\n", "\n", "## Bullet List with Format\n", "\n", "bullet list 1 944782\n", "\n", "- this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.\n", "- This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "- This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "- This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "## Nested Bullet List\n", "\n", "bullet list 1 c5e045\n", "\n", "- **item** 1\n", "- item 2\n", "- `` item `` 3\n", " - [item](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) 3.1\n", " - item 3.1.1\n", " - item 3.1.2\n", " - item 3.2\n", " - item 3.2.1\n", " - item 3.2.2\n", "\n", "# Ordered List 639d5a\n", "\n", "## Simple Ordered List\n", "\n", "Ordered list 1 e7bd58\n", "\n", "1. Alice\n", "2. Bob\n", "3. Cathy\n", "\n", "1. Ordered list 2 item 1 (there is an empty line above this between this and the previous bullet list)\n", "2. Ordered list 2 item 2\n", "3. Ordered list 2 item 3\n", "\n", "## Ordered List With Format\n", "\n", "ordered list 1 fd02cb\n", "\n", "11. this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.\n", "12. This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\n", "13. This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "14. This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)\n", "\n", "## Nested Ordered List\n", "\n", "ordered list 1 eb58ef\n", "\n", "1. Alice\n", "2. Bob\n", "3. Cathy\n", " 1. Cathy 1\n", " 1. Cathy 1.1\n", " 2. Cathy 1.2\n", " 2. Cathy 2\n", " 1. Cathy 2.1\n", " 2. Cathy 2.2\n", "\n", "# Task List 4141f8\n", "\n", "## Nested Task List\n", "\n", "task list 1 e5461d\n", "\n", "- [x] Do this\n", "- [ ] And do **this**\n", " - [ ] sub `` task `` 1\n", " - [x] sub task 1.1\n", " - [ ] sub ~~task~~ 1.2\n", " - [ ] sub **task** 2\n", " - [ ] sub task 2.1\n", " - [x] sub task 2.2\n", "\n", "# Code Block 3d7d7e \n", "\n", "This is a code block\n", "\n", "```\n", "> Hello world\n", "```\n", "\n", "This is a Python code block\n", "\n", "```python\n", "def add_two(a, b):\\n return a + b\n", "```\n", "\n", "# Image 75c648\n", "\n", "This is an image\n", "\n", "![media](https://www.python.org/static/img/python-logo.png)\n", "This is an image with alt text\n", "\n", "![Python Logo](https://www.python.org/static/img/python-logo.png)\n", "This is an image with clickable link\n", "\n", "[![media](https://www.python.org/static/img/python-logo.png)](https://www.python.org/)\n", "This is an image with capital and clickable link\n", "\n", "[![Python Logo](https://www.python.org/static/img/python-logo.png)](https://www.python.org/)\n", "\n", "# Table 8cb9f1\n", "\n", "## Simple Table 69b8c4\n", "\n", "simple table 1\n", "\n", "| **name**
| **age**
|\n", "| --- | --- |\n", "| Alice
| 20
|\n", "| Bob
| 35
|\n", "\n", "## Multiline Content Table 51e9b3\n", "\n", "multiline content table 1\n", "\n", "| **Col 1**
| **Col 2**
|\n", "| --- | --- |\n", "| key 1
special character \\| is not markdown friendly
| value 1
- this is **Alice**, *Bob*, Cathy, ~~David~~, `` Edward ``, Frank, George.
- This line has titled hyperlink [Atlas Doc Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).
- This line has url hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)
- This line has inline hyperlink [https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) |\n", "| key 2
special character \\| is not markdown friendly
| value 2
1. Alice
2. Bob
3. Cathy
    1. Cathy 1
        1. Cathy 1.1
        2. Cathy 1.2
    2. Cathy 2
        1. Cathy 2.1
        2. Cathy 2.2 |\n", "| key 3
special character \\| is not markdown friendly
| value 3
- [x] Do this
- [ ] And do **this**
    - [ ] sub `` task `` 1
        - [x] sub task 1.1
        - [ ] sub ~~task~~ 1.2
    - [ ] sub **task** 2
        - [ ] sub task 2.1
        - [x] sub task 2.2 |\n", "\n", "# Expand 0479c0\n", "\n", "This is a expandable container\n", "\n", "this is expand content\n", "\n", "- bullet 1 in expand content\n", "- bullet 2 in expand content\n", "- bullet 3 in expand content\n", "\n", "> Quote something here in expand content\n", "\n", "end of expand content\n", "\n", "# Quote 08e36f\n", "\n", "## Simple Quote 84378f\n", "\n", "simple quote 1\n", "\n", "> Alice says:\n", "> \n", "> Just do it!\n", "\n", "## Quote as Container b644da\n", "\n", "quote as container 1\n", "\n", "> This is a one line paragraph. Text may have **bold**, *italic*, underscore, ~~strike through~~, [hyperlink](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) and more.\n", "> \n", "> This is a bullet list\n", "> \n", "> - bullet 1 in quote\n", "> - bullet 2 in quote\n", "> \n", "> Code block in quote\n", "> \n", "> Start\n", "> \n", "> ```python\n", "> def mul_two(a, b):\\n return a * b\n", "> ```\n", "> \n", "> End\n", "\n", "# Panel 8c4bed\n", "\n", "This is an info\n", "\n", "> **INFO**\n", "> \n", "> Info here\n", "> \n", "> This is a one line paragraph. Text may have **bold**, *italic*, underscore, ~~strike through~~, [hyperlink](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) and more.\n", "> \n", "> This is a bullet list\n", "> \n", "> - bullet 1 in panel\n", "> - bullet 2 in panel\n", "> \n", "> Code block in quote\n", "> \n", "> Start\n", "> \n", "> ```python\n", "> def mul_two(a, b):\\n return a * b\n", "> ```\n", "> \n", "> End\n", "\n", "This is a note\n", "\n", "> **NOTE**\n", "> \n", "> Note here\n", "\n", "This is a success\n", "\n", "> **SUCCESS**\n", "> \n", "> Success here\n", "\n", "This is a warning\n", "\n", "> **WARNING**\n", "> \n", "> Warning here\n", "\n", "This is a error\n", "\n", "> **ERROR**\n", "> \n", "> Error here\n", "\n", "This is a custom emoji\n", "\n", "> **CUSTOM**\n", "> \n", "> Custom emoji info here\n", "\n", "This is an decision\n", "\n", "> Decision title\n", "> decision body here\n", "> - alice\n", "> - bob\n", "> - cathy\n", ">\n", "> This is pure text only\n", "This is an Date\n", "\n", "2025-01-01 \n", "\n", "This is a status\n", "\n", "`In Progress` \n", "\n", "This is a devider\n", "\n", "---\n", "\n", "## 1.1 Header 2\n", "\n", "### 1.1.1 Header 3\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.display import display, Markdown\n", "\n", "display(Markdown(md))" ] }, { "cell_type": "code", "execution_count": null, "id": "a456004c-c640-484b-afef-7850ce661f1c", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.8" } }, "nbformat": 4, "nbformat_minor": 5 }