-
-
Save quest4i/3b8b287e8158b63220550ecbcb98555f to your computer and use it in GitHub Desktop.
Convert Cofluence wiki page to markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip module - atlassian-python-api, markdownify | |
from atlassian import Confluence | |
from markdownify import markdownify as md | |
page = confluence.get_page_by_id(261095431, expand='body.storage') | |
body_html = page['body']['storage']['value'] | |
body_markdown = md(body_html) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing job, really works nice, thank you! In my case, it handled ~ 80% cases. I used the following function to remove the html trash from the rest 20%: