{"id":21740540,"url":"https://github.com/writecrow/lorem_gutenberg","last_synced_at":"2025-03-21T01:14:31.293Z","repository":{"id":57082536,"uuid":"89886036","full_name":"writecrow/lorem_gutenberg","owner":"writecrow","description":"Generate English-language filler text from Project Gutenberg","archived":false,"fork":false,"pushed_at":"2020-05-10T01:49:38.000Z","size":2918,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T03:01:07.268Z","etag":null,"topics":["gutenberg","lorem-ipsum","lorem-ipsum-generator","php-library"],"latest_commit_sha":null,"homepage":"https://lorem-gutenberg.markfullmer.com/demo","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writecrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-01T00:35:01.000Z","updated_at":"2021-01-22T11:12:56.000Z","dependencies_parsed_at":"2022-08-24T14:58:21.297Z","dependency_job_id":null,"html_url":"https://github.com/writecrow/lorem_gutenberg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Florem_gutenberg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Florem_gutenberg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Florem_gutenberg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Florem_gutenberg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writecrow","download_url":"https://codeload.github.com/writecrow/lorem_gutenberg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717338,"owners_count":20498284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gutenberg","lorem-ipsum","lorem-ipsum-generator","php-library"],"created_at":"2024-11-26T06:13:55.788Z","updated_at":"2025-03-21T01:14:31.275Z","avatar_url":"https://github.com/writecrow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lorem Gutenberg\n\n[![Circle CI](https://circleci.com/gh/writecrow/lorem_gutenberg.svg?style=shield)](https://circleci.com/gh/writecrow/lorem_gutenberg)\n\nA PHP library for generating random text, sourced from various authors in\nProject Gutenberg.\n\n![Screenshot of Text Generation](https://raw.githubusercontent.com/writecrow/lorem_gutenberg/master/screenshot.png)\n\n## Usage in an application\nThe included `/index.php` file contains a generation form demo.\n\nMake your code aware of the LoremGutenberg class via your favorite method (e.g.,\n`use` or `require`)\n\nThen pass a string of text into the class:\n```php\n$text = LoremGutenberg::generate();\necho $text;\n// Will return an excerpt of random length (1-10 sentences) from a random author.\n\n$text = LoremGutenberg::generate(array('author' =\u003e 'austen'));\necho $text;\n// Will return an excerpt of random length (1-10 sentences) from Jane Austen.\n\n$text = LoremGutenberg::generate(array('author' =\u003e 'hardy', 'sentences' =\u003e 3));\necho $text;\n// Will return an excerpt of 3 sentences from Thomas Hardy.\n```\n\n## Usage as an API\nThe file in `/api` demonstrates how GET parameters in a URL can be passed to LoremGutenberg. For example, `https://my-api.org/api/?author=hardy\u0026sentences=2` will return 2 sentences' worth of LoremGutenberg from Thomas Hardy.\n\n### Parameters\n| Name  | Description | Example |\n| ------------- | ------------- | ------------- |\n| `author`  | If absent, a random author will be used | hardy |\n| `sentences`  | If absent, a number from 1-10 will be used | 2 |\n\n### Sameple valid API queries\n- `/api/?author=hardy\u0026sentences=2`\n- `/api/?author=hardy`\n- `/api/?sentences=2`\n- `/api/`\n\n## What authors are available?\nAs of this writing, LoremGutenberg references texts from the following authors:\n```php\npublic static $authors = [\n  'austen' =\u003e 'Jane Austen',\n  'hardy' =\u003e 'Thomas Hardy',\n  'lawrence' =\u003e 'D.H. Lawrence',\n  'wharton' =\u003e 'Edith Wharton',\n];\n```\n\n## Testing\nUnit Tests can be run (after ```composer install```) by executing ```vendor/bin/phpunit```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Florem_gutenberg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritecrow%2Florem_gutenberg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Florem_gutenberg/lists"}