{"id":13658040,"url":"https://github.com/dhowe/RiTaJSv1","last_synced_at":"2025-04-24T08:31:06.008Z","repository":{"id":48027759,"uuid":"42713110","full_name":"dhowe/RiTaJSv1","owner":"dhowe","description":"RiTa: the generative language toolkit (in JS)","archived":false,"fork":false,"pushed_at":"2022-12-02T18:37:44.000Z","size":7938,"stargazers_count":268,"open_issues_count":9,"forks_count":41,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-07T15:08:27.972Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhowe.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":"2015-09-18T09:45:01.000Z","updated_at":"2024-10-14T17:37:44.000Z","dependencies_parsed_at":"2023-01-23T07:01:12.184Z","dependency_job_id":null,"html_url":"https://github.com/dhowe/RiTaJSv1","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhowe%2FRiTaJSv1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhowe%2FRiTaJSv1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhowe%2FRiTaJSv1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhowe%2FRiTaJSv1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhowe","download_url":"https://codeload.github.com/dhowe/RiTaJSv1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250591949,"owners_count":21455471,"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:00:55.391Z","updated_at":"2025-04-24T08:31:04.071Z","avatar_url":"https://github.com/dhowe.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/dhowe/RiTaJS.svg?branch=master)](https://travis-ci.org/dhowe/RiTaJS) \u003ca href=\"http://www.gnu.org/licenses/gpl-3.0.en.html\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-GPL-orange.svg\" alt=\"npm version\"\u003e\u003c/a\u003e \u003ca href=\"https://www.npmjs.com/package/rita\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/rita.svg\" alt=\"npm version\"\u003e\u003c/a\u003e [![CDNJS](https://img.shields.io/cdnjs/v/rita.svg)](https://cdnjs.com/libraries/rita/) [![Gitter](https://badges.gitter.im/dhowe/rita.svg)](https://gitter.im/dhowe/rita)\u0026nbsp;\n\n### RiTa.js: a generative language toolkit for JavaScript\n\n\u003ca href=\"https://rednoise.org/rita\"\u003e\u003cimg height=80 src=\"https://rednoise.org/rita/img/RiTa-logo3.png\"/\u003e\u003c/a\u003e\n\n#### [The RiTa website](http://rednoise.org/rita)\n\nRiTa.js is designed to an easy-to-use toolkit for experiments in natural language and generative literature, based on the [original RiTa](http://rednoise.org/rita) library for Processing/Java. RiTa.js works alone or with p5.js or node/npm, or in the browser.  All RiTa and RiTa.js tools are free/libre/open-source via the [GPL](http://www.gnu.org/licenses/gpl.txt).\n\n\n#### About the project\n--------\n* Author:           [Daniel C. Howe](https://rednoise.org/daniel)\n* Web Site:         https://rednoise.org/rita\n* Reference:        http://www.rednoise.org/rita/reference/\n* License:          GPL (see included [LICENSE](https://github.com/dhowe/RiTaJS/blob/master/LICENSE) file)\n* Github Repo:      https://github.com/dhowe/RiTaJS/\n* Issues:      https://github.com/dhowe/RiTa/issues\n* FAQ: https://github.com/dhowe/RiTa/wiki\n* Related:          [RiTa](https://github.com/dhowe/RiTa) (Java)\n\n\n\u0026nbsp;\n\n\n#### A simple sketch\n--------\nCreate a new file on your desktop called 'test.html' and download the latest rita.js from [here](http://rednoise.org/rita/download/rita.min.js), add the following lines, save and drag it into a browser:\n\n```html\n\u003chtml\u003e\n  \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"./rita.min.js\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n    window.onload = function() {\n      let words = RiTa.tokenize(\"The elephant took a bite!\");\n      $('#content').text(words);\n    };\n  \u003c/script\u003e\n  \u003cdiv id=\"content\" width=200 height=200\u003e\u003c/div\u003e\n\u003chtml\u003e\n```\n\n#### With [node.js](http://nodejs.org/) and [npm](https://www.npmjs.com/)\n--------\nTo install: `$ npm install rita`\n\n```javascript\nlet rita = require('rita');\nlet rs = rita.RiString(\"The elephant took a bite!\");\nconsole.log(rs.features());\n```\n\n#### With [p5.js](http://p5js.org/)\n--------\nCreate a new file on your desktop called 'test.html' and download the latest rita.js from [here](http://rednoise.org/rita/download/rita.min.js), add the following lines, save and drag it into a browser:\n\n```html\n\u003chtml\u003e\n  \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.3/p5.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"./rita.min.js\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n  function setup() {\n\n    createCanvas(200,200);\n    background(50);\n    textSize(20);\n    noStroke();\n\n    let words = RiTa.tokenize(\"The elephant took a bite!\")\n    for (let i=0; i \u003c words.length; i++) {\n        text(words[i], 50, 50 + i*20);\n    }\n  }\n  \u003c/script\u003e\n\u003c/html\u003e\n```\n\n\n#### With [browserify](http://browserify.org/) and [npm](https://www.npmjs.com/)\n--------\nInstall [browserify](https://www.npmjs.com/package/browserify) (if you haven't already)\n```\n$ sudo npm install -g browserify\n```\nCreate a file called 'main.js' with the following code:\n```java\nrequire('rita');\n\nlet rs = RiString(\"The elephant took a bite!\");\nconsole.log(rs.features());\n```\nNow install RiTa\n```\n$ npm install rita\n```\nNow use browserify to pack all the required modules into bundle.js\n```\n$ browserify main.js -o bundle.js\n```\nCreate create a file called 'test.html' with a single script tag as below, then open it in a web browser and check the output in the 'Web Console'\n```html\n\u003cscript src=\"bundle.js\"\u003e\u003c/script\u003e\n```\n\n#### With [processing.js](http://processingjs.org)\n--------\nCreate a new file on your desktop called 'test.html' and download the latest rita.js from [here](http://rednoise.org/rita/download/rita.min.js), add the following lines, save and drag it into a browser:\n\n```html\n\u003chtml\u003e\n  \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.8/processing.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"./rita.min.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/processing\" data-processing-target=\"processing-canvas\"\u003e\n    void setup() {\n\n      size(200,200);\n      background(50);\n      textSize(20);\n      noStroke();\n\n      String words = RiTa.tokenize(\"The elephant took a bite!\");\n      for (int i=0; i \u003c words.length; i++) {\n          text(words[i], 50, 50 + i*20);\n      }\n    }\n  \u003c/script\u003e\n  \u003ccanvas id=\"processing-canvas\"\u003e \u003c/canvas\u003e\n\u003c/html\u003e\n```\n\n\n#### Can I contribute?\n--------\nPlease! We are looking for more coders to help out... Just press *Fork* at the top of this github page and get started, or follow the instructions below...\n\n\n#### Development Setup\n--------\n1. Download and install [git](https://www.git-scm.com/), [npm](https://www.npmjs.org/), and [gulp](). If you have them already, move on to step #2.\n\n    a. You can find a version of __git__ for your OS [here](https://www.git-scm.com/)  \n    b. The easiest way to install __npm__ is to install [node.js](http://nodejs.org/)  \n    c. You can install __gulp__ via npm as follows:\n\n    ```bash\n    $ npm install -g gulp\n    ```\n  \n2. [Fork and clone](https://help.github.com/articles/fork-a-repo) this library.\n\n    a. First, login to github and fork the project  \n    b. Then, from a terminal/shell:\n\n    ```bash\n    $ git clone https://github.com/dhowe/RiTaJS.git\n    ```\n3. Now navigate into the project folder and install dependencies via npm.\n\n    ```bash\n    $  cd RiTaJS \u0026\u0026 npm install\n    ```\n4. To create the library from src, use gulp.\n\n    ```bash\n    $ gulp build\n    ```\n5. Run the tests with gulp.\n\n    ```bash\n    $ gulp test\n    ```\n6. Work on an existing [issue](https://github.com/dhowe/RiTa/issues?q=is%3Aopen+is%3Aissue+label%3ARiTaJS), then [submit a pull request...](https://help.github.com/articles/creating-a-pull-request)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhowe%2FRiTaJSv1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhowe%2FRiTaJSv1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhowe%2FRiTaJSv1/lists"}