PHPackages                             writecrow/lorem\_gutenberg - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. writecrow/lorem\_gutenberg

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

writecrow/lorem\_gutenberg
==========================

A PHP library for generating filler text from Project Gutenberg books

1.1(8y ago)193[1 issues](https://github.com/writecrow/lorem_gutenberg/issues)MITPHPCI failing

Since May 13Pushed 6y ago4 watchersCompare

[ Source](https://github.com/writecrow/lorem_gutenberg)[ Packagist](https://packagist.org/packages/writecrow/lorem_gutenberg)[ RSS](/packages/writecrow-lorem-gutenberg/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Lorem Gutenberg
===============

[](#lorem-gutenberg)

[![Circle CI](https://camo.githubusercontent.com/0172e6c8b4c390f2cdfebef3cb0e67014d67d69daa45ed4476317e35b5764ac9/68747470733a2f2f636972636c6563692e636f6d2f67682f777269746563726f772f6c6f72656d5f677574656e626572672e7376673f7374796c653d736869656c64)](https://circleci.com/gh/writecrow/lorem_gutenberg)

A PHP library for generating random text, sourced from various authors in Project Gutenberg.

[![Screenshot of Text Generation](https://raw.githubusercontent.com/writecrow/lorem_gutenberg/master/screenshot.png)](https://raw.githubusercontent.com/writecrow/lorem_gutenberg/master/screenshot.png)

Usage in an application
-----------------------

[](#usage-in-an-application)

The included `/index.php` file contains a generation form demo.

Make your code aware of the LoremGutenberg class via your favorite method (e.g., `use` or `require`)

Then pass a string of text into the class:

```
$text = LoremGutenberg::generate();
echo $text;
// Will return an excerpt of random length (1-10 sentences) from a random author.

$text = LoremGutenberg::generate(array('author' => 'austen'));
echo $text;
// Will return an excerpt of random length (1-10 sentences) from Jane Austen.

$text = LoremGutenberg::generate(array('author' => 'hardy', 'sentences' => 3));
echo $text;
// Will return an excerpt of 3 sentences from Thomas Hardy.
```

Usage as an API
---------------

[](#usage-as-an-api)

The file in `/api` demonstrates how GET parameters in a URL can be passed to LoremGutenberg. For example, `https://my-api.org/api/?author=hardy&sentences=2` will return 2 sentences' worth of LoremGutenberg from Thomas Hardy.

### Parameters

[](#parameters)

NameDescriptionExample`author`If absent, a random author will be usedhardy`sentences`If absent, a number from 1-10 will be used2### Sameple valid API queries

[](#sameple-valid-api-queries)

- `/api/?author=hardy&sentences=2`
- `/api/?author=hardy`
- `/api/?sentences=2`
- `/api/`

What authors are available?
---------------------------

[](#what-authors-are-available)

As of this writing, LoremGutenberg references texts from the following authors:

```
public static $authors = [
  'austen' => 'Jane Austen',
  'hardy' => 'Thomas Hardy',
  'lawrence' => 'D.H. Lawrence',
  'wharton' => 'Edith Wharton',
];
```

Testing
-------

[](#testing)

Unit Tests can be run (after `composer install`) by executing `vendor/bin/phpunit`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~243 days

Total

2

Last Release

3045d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97841a43aa432072be5449d3a5a32869c123982b174cb8c1b7eb2010181e8949?d=identicon)[markfullmer](/maintainers/markfullmer)

![](https://www.gravatar.com/avatar/bfa4c33dc0c7ac05dbdd31f28413070cd3d1b02f67c7ba788d706a0b684e5fa4?d=identicon)[writecrow](/maintainers/writecrow)

---

Top Contributors

[![markfullmer](https://avatars.githubusercontent.com/u/4305692?v=4)](https://github.com/markfullmer "markfullmer (22 commits)")

---

Tags

gutenberglorem-ipsumlorem-ipsum-generatorphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/writecrow-lorem-gutenberg/health.svg)

```
[![Health](https://phpackages.com/badges/writecrow-lorem-gutenberg/health.svg)](https://phpackages.com/packages/writecrow-lorem-gutenberg)
```

###  Alternatives

[mkdreams/mdword

OFFICE WORD 动态数据 绑定数据 生成报告；OFFICE WORD Dynamic data binding data generation report.

521.3k](/packages/mkdreams-mdword)[xibosignage/xibo-xmr

Xibo Message Relay

1011.5k](/packages/xibosignage-xibo-xmr)

PHPackages © 2026

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