PHPackages                             karuna/fountain - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. karuna/fountain

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

karuna/fountain
===============

A PHP parser for Fountain, a simple markup syntax that allows screenplays to be written, edited, and shared in plain, human-readable text.

v1.2.2(5y ago)11431MITPHPPHP &gt;=7.2

Since Oct 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tao/fountain)[ Packagist](https://packagist.org/packages/karuna/fountain)[ RSS](/packages/karuna-fountain/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

Fountain Parser
===============

[](#fountain-parser)

Fountain is a simple markup syntax that allows screenplays to be written, edited, and shared in plain, human-readable text. Fountain allows you to work on your screenplay anywhere, on any computer, using any software that edits text files.

For more details on Fountain see .

A demo is available on [heroku](https://fountain-livewire.herokuapp.com) for testing.

Getting started
---------------

[](#getting-started)

The simple version for parsing a screenplay text straight into HTML:

```
    $input = "My fountain input text.";
    $screenplay = new \Fountain\Screenplay();
    $html = $screenplay->parse($input);
```

The longer version is that Fountain first creates a collection of Elements, which you may use for other purposes. Once the Fountain Elements have been parsed, the FountainTags class determines the correct HTML tags to print.

```
    $input = "My fountain input text.";
    // determine fountain elements
    $fountainElements = (new \Fountain\FountainParser())->parse($input);
    // parse fountain elements into html
    $html = (new \Fountain\FountainTags())->parse($fountainElements);
```

Mentions
--------

[](#mentions)

The code has been built upon the previous work of these contributors.

- [Alex King (PHP port)](https://github.com/alexking/Fountain-PHP)
- [Yousefi &amp; John August (original Objective-C version)](https://github.com/nyousefi/Fountain)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

5

Last Release

2012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/883ee9a83f841aecdf6b30eee65aa63f067d68e2e4b8d634a8accc06e84301f8?d=identicon)[k4runa](/maintainers/k4runa)

---

Top Contributors

[![tao](https://avatars.githubusercontent.com/u/1446331?v=4)](https://github.com/tao "tao (17 commits)")

---

Tags

fountainfountain-parserphp-markdown-parsermarkdownfountainscreenplay

### Embed Badge

![Health badge](/badges/karuna-fountain/health.svg)

```
[![Health](https://phpackages.com/badges/karuna-fountain/health.svg)](https://phpackages.com/packages/karuna-fountain)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M725](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M698](/packages/league-commonmark)[michelf/php-markdown

PHP Markdown

3.5k52.4M344](/packages/michelf-php-markdown)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k28.6M196](/packages/league-html-to-markdown)[cebe/markdown

A super fast, highly extensible markdown parser for PHP

1.0k32.5M136](/packages/cebe-markdown)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
