Git Product home page Git Product logo

marp-python's Introduction

marp-python

Python library for generating Marp presentations. This lib helps to automatically generate presentations with simple builder class.

For correct work please install marp-cli:

  1. download latetst binary file
  2. mv marp /usr/local/bin

Getting started

Marp is open source project, that allows to generate pptx, html, png, notes or pdf presentations from .md files. This library generates correct syntax for .md files and then convert it to presentation with marp-client. Example:

css = open("theme.css", "r").read()
presentation = Presentation(css = css)
presentation.add_slide("Marp presentation", "Marp presentation preview",{'backgroundColor': '#f7d064'}, 
                        {'image': 'logo.jpeg', 'is_background': True, 'bg_position': 'left'})
presentation.save('example', 'pptx')

For bullet list divide each bullet with -, * or +. Alternatively you can pass numbered list. Pass text parameter as follows:

"1. First bullet \n2. Second bullet \n ..."
"- First bullet \n- Second bullet \n ..."

If you wish to set custom css, the slide "body" class is named "section". For more info read official docs.

Example of image params struct:

pararm description
image image path or url
is_background bool is image background
bg_position position of background (left, right, vertical)
split_pct percent of background that image take
size size of bg (cover, contain, fit, auto, x%)

For filter:

param description
image image path or url
filter blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate,sepia
value filter value

For image:

param description
image image path or url
width image width
height image height

marp-python's People

Contributors

hsergeyf avatar romanovbogdan avatar

Stargazers

Đặng Văn Sâm (Andrew) avatar Dmitriy Ulybin avatar  avatar  avatar

Watchers

 avatar

Forkers

romanovbogdan

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.