{"id":13658646,"url":"https://github.com/robbestad/Rantjs","last_synced_at":"2025-04-24T11:32:32.312Z","repository":{"id":24501186,"uuid":"27906588","full_name":"robbestad/Rantjs","owner":"robbestad","description":"Procedurally generate text with JavaScript","archived":false,"fork":false,"pushed_at":"2016-10-17T06:34:06.000Z","size":3644,"stargazers_count":220,"open_issues_count":5,"forks_count":10,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-08T14:59:59.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robbestad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-12T05:22:54.000Z","updated_at":"2024-10-13T20:59:34.000Z","dependencies_parsed_at":"2022-09-26T22:01:18.542Z","dependency_job_id":null,"html_url":"https://github.com/robbestad/Rantjs","commit_stats":null,"previous_names":["svenanders/rantjs"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2FRantjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2FRantjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2FRantjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2FRantjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbestad","download_url":"https://codeload.github.com/robbestad/Rantjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952562,"owners_count":17230913,"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":[],"created_at":"2024-08-02T05:01:01.379Z","updated_at":"2024-11-10T12:30:32.317Z","avatar_url":"https://github.com/robbestad.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Rantjs\n\nRantjs is a procedural text generator. The goal is to augment human creativity with the boundless potential of randomness. Inspired by [Rant][1].\n\n\u003cimg src=\"http://res.cloudinary.com/sven-anders-robbestad/image/upload/c_scale,w_350/v1418975366/rantjs_0.8.4.png\"\u003e\n\nThe project is available via npm (do _npm install rantjs_). \n\n\n## Demo and more information\n\nInteractive demo available [here][5]\n\nClick [here][4] for a writeup on my blog\n\n\n## Usage\n\n    var rant = require(\"rantjs\");\n    var sentence=rant('\u003cfirstname male\u003e likes to \u003cverb-transitive\u003e \u003cnoun.plural\u003e with \u003cpron poss male\u003e pet \u003cnoun-animal\u003e on \u003ctimenoun dayofweek plural\u003e.');\n\n    console.log(sentence); // 'Sean likes to chop parrots with his pet cat on Saturdays.'\n\nFor implementation details, please visit the [npmjs page][3]\n\n## Install\n\n```bash\ngit clone https://github.com/svenanders/rantjs \u0026\u0026 cd rantjs\nnpm i\ngulp serve\n```\nThen open http://localhost:8000\n\n\n## Development Plan\n\nEasy way to choose alternative dictionaries\n\nIndefinite article (a/an) automation\n\nOverwriting (targets)\n\n~~Capitalisation~~\n\n~~Looping (repeaters)~~\n\nConditionals\n\n## Contributions\n\nContributions are welcome. Feel free to submit an issue/pull request. The following areas are\nof particular interest:\n\nDocumentation (wiki/code)\n\nFixing bugs\n\nOptimization\n\nFunctions in the development plan\n\nNew language features\n\nTesting. Currently, this is the result of the coverage report:\n\n    Statements   : 96.44% ( 461/478 )\n    Branches     : 67.65% ( 46/68 )\n    Functions    : 100% ( 18/18 )\n    Lines        : 97.24% ( 458/471 )\n\nIdeally, it should be 100% on everything\n\n## New in version 1.0.0\n\n  Added option for custom dictionaries. Note that this replaces the built-in dictionary.\n  \n    var yourCustomDic = {}\n    ...\n    rant('your text', yourCustomDic);\n     \nA sample dictionary file can be found in the ./src folder. Also take a look at the built-in english dicionary in the same folder for reference.\n\n## New in version 0.9.x\n\n  0.9.7 - Added nonsense verbs from Rantionary\n  \n  0.9.5 - Added verbs for success and defeat\n  \n  0.9.4 - Added Death (\u003cverb death\u003e)\n  \n  0.9.3 - Added climb (\u003cverb climb up|down\u003e)\n\n## New in version 0.9.1\n\n  Rewrote Rantjs for CommonJS. \n  \n  Removed several gulp tasks (concat, minify)\n \n  Refactored the tests\n \n  Renamed the app internally\n \n  New usage syntax (not compatible with 0.8.x)\n \n  You can now call Rantjs directly from require:\n  \n    var sentence=require(\"rantjs\")(\"\u003cfirstname male\u003e likes to \u003cverb-transitive\u003e \n    \u003cnoun.plural\u003e with \u003cpron poss male\u003e pet \u003cnoun-animal\u003e on \u003ctimenoun dayofweek plural\u003e.\");\n \n  Added randomization:\n  \n    require(\"rantjs\")(\"A random string: [rep:8][sep:\\N]{\\C}\");\n    //A random string: XUACJGOGN\n\n## New in version 0.8.6\n\n  Added support for [rep:x]\n\n  Usage:\n\n    [case:title][sep:\\n][rep:3]{I like \u003cnoun animal plural\u003e but not \u003cnoun animal plural\u003e}\n\n    // I Like Ogres but not Turtles\n    // I Like Bulls but not Horses\n    // I Like Poodles but not Owls\n\n   Note: [sep:\\n] dictates newlines. Alternatively, you can specify \\s for space.\n\n## New in version 0.8.5\n\n  Added support for [case]-tag.\n\n  Usage:\n\n    [case:upper]\u003cfirstname male\u003e\n\n  Variants:\n\n    [case:none|default|word|upper|lower|case|sentence]\n\n\n\n[1]: https://github.com/TheBerkin/Rant\n[3]: https://www.npmjs.com/package/rantjs\n[4]: http://www.robbestad.com/blog/procedurally-generated-text-with-rantjs\n[5]: http://rantjs.surge.sh/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbestad%2FRantjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbestad%2FRantjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbestad%2FRantjs/lists"}