Package: md2notionpage
md2notionpageA Python package to convert Markdown text into Notion pages. This module provides functionality to create Notion pages from Markdown text, parse Markdown into Notion blocks, and process inline formatting.InstallationYou can install the package using pip:pipinstallmd2notionpageUsageHere's a basic example of how to use themd2notionpagefunction:frommd2notionpageimportmd2notionpagemarkdown_text="""# My PageThis is a Notion page created from Markdown content."""title='My Notion Page'parent_page_id='YOUR_PARENT_PAGE_ID'notion_page_url=md2notionpage(markdown_text,title,parent_page_id)Supported Markdown FeaturesHeadingsYou can create headings using the#symbol. The number of#symbols determines the level of the heading:# Heading Level 1
## Heading Level 2
### Heading Level 3Text FormattingBold Text: You can create bold text using**or__.Italic Text: You can create italic text using*or_.Bold and Italic: You can combine bold and italic using__*or**_.Strikethrough: You can strikethrough text using~.InlineCode: You can create inline code using backticks`.Inline Latex: You can create inline latex using$.Latex BlockYou can create a Latex block using$$:$$
x = \sqrt{y^2 + z^2}
$$ListsUnordered List: You can create an unordered list using-.Ordered List: You can create an ordered list using numbers followed by a dot1..LinksYou can create links using[link text](url).Indented CodeYou can create indented code using four spaces:def hello_world():
        print("Hello, world!")Code BlockYou can create a code block using triple backticks:```python
def hello_world2():
    print("Hello, world2!")
```BlockquoteYou can create a blockquote using>:> Quote textTablesYou can create tables with or without header rows. They will become LaTeX/KaTeX tables in the Notion page.Table with Headers| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Content  | Content  | Content  |Table without Headers| Content 1.1 | Content 2.1 | Content 3.1 |
| Content 1.2 | Content 2.2 | Content 3.2 |Horizontal LineYou can create a horizontal line using three or more dashes---.ImagesYou can insert images with or without alt text:With Alt Text:![Alt Text](https://raw.githubusercontent.com/markomanninen/md2notion/main/photo-1501504905252-473c47e087f8.jpeg)Alt gives an image caption in Notion.Without Alt Text:![](https://raw.githubusercontent.com/markomanninen/md2notion/main/photo-1501504905252-473c47e087f8.jpeg)Nested ListsYou can create nested lists by indenting sub-items:Item 1Sub-item 1Sub-item 2Sub-sub-item 1Sub-sub-item 2Item 2Similarly unordered lists are supported.Dependenciesnotion-clientEnvironment VariablesYou must set theNOTION_SECRETenvironment variable with your Notion API token.NotesThis package is designed to work with the Notion API and requires proper authentication. Make sure to follow Notion's API documentation to set up your integration.DevelopmentUse .env to setupNOTION_SECRETandNOTION_PARENT_PAGE_IDRun tests:python -m unittest discover testsWhen tests are ok, commit changesPackage controlChange to next version number in setup.pyCreate wheels:python setup.py sdist bdist_wheelDeploy:python -m twine upload dist/*LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.