Skip to main content

A slide maker that transform markdown into slides.

Project description

moffee logo

moffee: Make Markdown Ready to Present

moffee is an open-source slide maker that transforms markdown documents into clean, professional slide decks.

  • moffee handles layout, pagination, and styling, so you can focus on your content.
  • There's little to learn. moffee uses simple syntax to arrange and style content to your liking.
  • A live web interface updates slides as you type, allowing you to start a slideshow or export it to PDF.

An Example

Click to expand input markdown document (29 lines)
# moffee
## Make markdown ready to present
@(layout=centered)

## Why moffee?

- **80/20 Rule**[^1]: Creating slides can be time-consuming, often requiring 80% of the effort for just 20% of the outcome.
- `moffee` transforms markdown into professional presentations effortlessly.
    - Use simple markdown syntax.
    - Enjoy out-of-the-box paging and styling.
    - Easily arrange text and images.

[^1]: https://en.wikipedia.org/wiki/Pareto_principle

## Showcasing
### Style with Markdown

==Markdown== is all you need! Elements like $tex$ and `code` are rendered with elegant style.

!!! note
    moffee automatically breaks pages and chooses titles based on context.

### Media Layout

One of moffee's strengths is using dividers to organize text and images effectively.

___

- Use `---` to trigger page breaks.
- Use `***` to arrange elements horizontally.
- Use `___` to split elements vertically.

moffee automatically adjusts element sizes to accommodate large blocks of text or complex illustrations.

***

![blue coffee](coffee.png)

moffee example PDF

Installation

moffee is written in Python and is recommended to install with pipx:

pipx install moffee
# or `pip install moffee`

Preview slides in a live web server or export to HTML:

moffee live example.md # launch a server
# or
moffee make example.md output_html/ # export to HTML

Usage

To start, write in standard markdown. moffee supports most extended syntax found in Obsidian Flavored Markdown.

# Markdown Title
Use **bold** and *italic* for emphasis.

- Extended syntax like ~~strikethroughs~~ is supported.

To create a new slide, begin a new heading:

## Page 1
Some text

## Page 2
This sentence will appear on the second slide.

Alternatively, use --- to manually trigger a new slide:

## Page 1
Text on the first slide
---
Text on the next slide.

You'll notice the second slide shares the Page 1 title. moffee selects the most suitable title for each slide.

In addition to ---, moffee supports *** and ___ for in-slide layout. Use *** to separate elements horizontally:

Text on the left.
***
![Image on the right](https://placehold.co/600x400)

___ places elements vertically and takes precedence over ***. Use them together for flexible layouts:

Top bun
___
Patty on the left
***
Lettuce on the right
___
Bottom bun

Options and Styles

Front matter is used to define moffee's behavior. Default values are:

---
layout: content # HTML template. Use "centered" for centered alignment.
resource_dir: "." # Relative URLs are based on this directory.
default_h1: false # Inherit H1 from previous slides if not defined.
default_h2: true  # Inherit H2
default_h3: true  # Inherit H3
---

Any CSS property can be set in the front matter. For example, set a dark gray background for all slides:

---
layout: content
background-color: darkgray
color: white
---

moffee also supports local style decorators with the syntax @(property=value). Use these within the document to set attributes for specific slides:

# A refined landing page
Our journey begins here
@(layout=content, background-image='url("https://placehold.co/600x400")')

License

MIT License © 2024 Wenbo Pan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moffee-0.1.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

moffee-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file moffee-0.1.0.tar.gz.

File metadata

  • Download URL: moffee-0.1.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.2.0

File hashes

Hashes for moffee-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d41d91d0c2069a713f7e0506856ad4c067a589f9d291c3d3fd5d3ad0116dcd2f
MD5 c85ceceb75e5538a3a17c2604460fe4e
BLAKE2b-256 4798632b5c169fc63038ca89bcb07d54fc93c3e858e7c1d115b09e8bf9bce105

See more details on using hashes here.

File details

Details for the file moffee-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moffee-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.2.0

File hashes

Hashes for moffee-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06f3bd38de30582a21d6437f1c394a267b72a9a914a3d47cc0ca51c66aa5d5d8
MD5 1c108dc1108e77e9e731a1d8851e298a
BLAKE2b-256 e031a49e5b538b64f1d68bed93f23afd5e7b86fecb3f657a7e584918c2257f5a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page