Code Monkey home page Code Monkey logo

mubu2markdown's Introduction

Mubu2Markdown

Usage

  1. Export your mubu post to HTML format
  2. 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: set True to show MUBU uploaded image in the output, otherwise False

  1. 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>')

Custom Token

To make sure your exported markdown will show as you wish, take the following rules:

  1. the script will take every line as normal content, it's the basic
  2. prefix with - (don't forget one blank in it) to make a line as a sub-item
  3. prefix with 1. (one blank too) number and dot to make a line as a sub-item with number
  4. prefix with > (one blank) to make a line as a note
  5. other markdown token will be auto compat:
    1. wrap with single "`" to make a one-line code
    2. wrap with "```" to make multi-line code (now need to be adjusted by manual)
    3. prefix with # to make line as a Hx(x is the count of #) title
    4. ![]() for image
    5. []() for link
    6. wrap with ** make text bold
    7. wrap with * make text italic
    8. wrap with ~~ make text strikethrough
    9. wrap with *** make text both bold and italic
  6. and other text will follow your markdown editor's render rule

mubu2markdown's People

Contributors

lkv1988 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.