- Export your mubu post to HTML format
- In Python code, construct a MubuPost by your exported html file
p = MubuPost(output_html_path='<path to your exported html file>', use_mubu_img=True)
use_mubu_img
: setTrue
to show MUBU uploaded image in the output, otherwiseFalse
- Call
to_markdown()
method, then pick your markdown file in the same directory
p.to_markdown('<maybe some name or default will be the title>')
To make sure your exported markdown will show as you wish, take the following rules:
- the script will take every line as normal content, it's the basic
- prefix with
-
(don't forget one blank in it) to make a line as a sub-item - prefix with
1.
(one blank too) number and dot to make a line as a sub-item with number - prefix with
>
(one blank) to make a line as a note - other markdown token will be auto compat:
- wrap with single "`" to make a one-line code
- wrap with "```" to make multi-line code (now need to be adjusted by manual)
- prefix with
#
to make line as aHx
(x is the count of#
) title ![]()
for image[]()
for link- wrap with
**
make text bold - wrap with
*
make text italic - wrap with
~~
make textstrikethrough - wrap with
***
make text both bold and italic
- and other text will follow your markdown editor's render rule