npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fountainpub

v1.0.6

Published

Generate PDF and HTML from Fountain screenplays with configurable settings via .fountainpubrc

Downloads

6

Readme

Attribution

This project is a fork of betterfountain by Piers Deseilligny, stripped of a lot of functionality and decoupled from VScode to allow for configurable PDF and HTML exports of a .fountain file in CLI environments.

This is an fork of an extension for Visual Studio Code which allows you to write screenplays using the fountain syntax quickly and efficiently. (If you're already confused click here).

Unlike other screenwriting software (such as Final Draft) BetterFountain focuses on removing friction between you and the text - there's no page breaks, no large unintuitive menus and overlapping windows, no delays when you press "Enter" after having written some dialogue, no slow loading documents, none of that. Just text and a handfull of unintruding features which remove even more friction between the story in your head and a finished screenplay.

And because it's an a CLI tool, you can use it in Github Actions to automate a publishing workflow.

Features (courtesy of Piers)

  • Industry-standard PDF generation
    • Includes scenes and sections as PDF bookmarks, for easy navigation in your reader of choice
    • Possible to highlight any specified characters in the PDF
  • Custom font support (Add "Font:" at the top of your .fountain screenplay, with the other title page keys, followed by the name of a font installed on your system) (untested)
  • Approximation of a screenplay's duration (with -i flag, untested)

Why?

Writing with fountain lets you focus on the essential. With the addition of autocomplete and syntax highlighting, you have the ultimate clutter-free ultra-fast solution for writing screenplays. And because it's an extension for vscode, it's free and cross-platform, and you get lots of other cool features such as integrated source control and near-infinite extensibility.

Usage

npm install -g fountainpub

# Convert to PDF
fountainpub script.fountain -p
fountainpub script.fountain -p script.pdf

# Convert to HTML
fountainpub script.fountain -h
fountainpub script.fountain -h script.html

# Convert to both
fountainpub script.fountain -p -h
fountainpub script.fountain -p script.pdf -h script.html

# With custom configuration
fountainpub script.fountain -p script.pdf --config .fountainpubrc
fountainpub <source.fountain> -[p|h|i]

-p, -p <o.pdf>  generates a pdf in the 
                same directory with the 
                same base name, unless 
                another name is provided

-h, -h <o.html> generates a html in the 
                same directory with the 
                same base name, unless 
                another name is provided

-i:             prints screenplay 
                statistics

Configuration

print_profile: 'usletter'  # or 'a4'
scenes_numbers: 'left'     # 'left', 'right', 'both', or false
embolden_character_names: true
show_page_numbers: true
text_contd: "(CONT'D)"
text_more: "(MORE)"

CI/CD

Please see FountainPub.template for potential integration ideas!

To Do

I mean this is my first npm package and it was crudely ripped out of vscode, so I'm sure it can be cleaned up. PRs welcome.

Thanks / Third-party licenses

  • Most of all, thanks to Piers Deseilligny for his amazing BetterFountain extension and beautifully generated pdf and html files.

  • The fountain parsing uses elements from the Fountain.js library by Matt Daly, covered by the MIT License

  • The fountain parsing and PDF generation feature is based on Piotr Jamróz's Afterwriting, also covered by the MIT License

  • The project includes Kevin Decker's jsdiff library, covered by the BSD License

  • The PDF Parser uses Mozilla's PDF.JS, covered by the Apache-2.0 License

  • The project was built using Microsoft's language server example extension as a boilerplate.

  • The default font used in the preview and in the exported PDF is "Courier Prime", more specifically a version which adds support for Azerbaijani, Belorussian, Kazakh, Russian, and Ukrainian