Closed realCrush closed 3 years ago
If you're writing a script yourself, then yes, convert
takes a file or a string
def convert(mdFile, notionPyRendererCls=NotionPyRenderer):
"""
Converts a mdFile into an array of NotionBlock descriptors
@param {file|string} mdFile The file handle to a markdown file, or a markdown string
@param {NotionPyRenderer} notionPyRendererCls Class inheritting from the renderer
incase you want to render the Markdown => Notion.so differently
"""
If you're using the CLI, then no, there's currently no way to use stdin to read the markdown text unfortunately
If you're writing a script yourself, then yes,
convert
takes a file or a stringdef convert(mdFile, notionPyRendererCls=NotionPyRenderer): """ Converts a mdFile into an array of NotionBlock descriptors @param {file|string} mdFile The file handle to a markdown file, or a markdown string @param {NotionPyRenderer} notionPyRendererCls Class inheritting from the renderer incase you want to render the Markdown => Notion.so differently """
If you're using the CLI, then no, there's currently no way to use stdin to read the markdown text unfortunately
thanks, I will try later 😄
Is it possible processing markdown strings instead of md files? On my server backend, if I can processing markdown strings instead of md files, time delay would be hugely reduced, because don't have to do I/O operations, is it possible?