{"id":13658749,"url":"https://github.com/polm/shesha","last_synced_at":"2026-02-01T15:39:10.332Z","repository":{"id":57358323,"uuid":"90763160","full_name":"polm/shesha","owner":"polm","description":"Random generator toolkit ","archived":false,"fork":false,"pushed_at":"2018-09-27T14:56:21.000Z","size":2053,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T09:54:29.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://polm.github.io/shesha/","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/polm.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":"2017-05-09T15:38:15.000Z","updated_at":"2018-09-28T01:48:46.000Z","dependencies_parsed_at":"2022-09-06T22:21:34.955Z","dependency_job_id":null,"html_url":"https://github.com/polm/shesha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/polm/shesha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fshesha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fshesha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fshesha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fshesha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polm","download_url":"https://codeload.github.com/polm/shesha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fshesha/sbom","scorecard":{"id":740259,"data":{"date":"2025-08-11","repo":{"name":"github.com/polm/shesha","commit":"a079ed3f9c7b904f4af6d16f7b3fb7197802e7e8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T17:13:38.345Z","repository_id":57358323,"created_at":"2025-08-22T17:13:38.346Z","updated_at":"2025-08-22T17:13:38.346Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28981350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T15:35:50.179Z","status":"ssl_error","status_checked_at":"2026-02-01T15:35:38.075Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:02.293Z","updated_at":"2026-02-01T15:39:10.299Z","avatar_url":"https://github.com/polm.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Shesha\n\n![Shesha, King of the Nagas](https://github.com/polm/shesha/raw/master/shesha.jpg)\n\nA tool for quickly building random generators. (Still pretty rough, but working.)\n\n## Command Line Quickstart\n\nFor the command line interface, do this:\n\n    npm install -g shesha\n    shesha \"Shesha is [!c /cool/nice/great/sssuper/]!\"\n\nIf you're intrigued, read on...\n\n## Web Version\n\nEven if you want to use Shesha mainly on the command line, it's easier to play around with the commands at first in the web version.\n\nTo use the web version, go [here](https://polm.github.io/shesha/) or check out the git repo and start an HTTP server.\n\nThe left pane is code, and after every keypress the right pane is updated. \n\nThe code in the left pane is divided into blocks separated by blank lines. There are three kinds of blocks.\n\n`deck` and `die` create random sources you can use in the generator. They both have this format, using `deck` as an example:\n\n    deck my deck name goes here\n    entry 1\n    entry 2\n    entry 3\n\nA few things to note:\n\n- no quotes are needed anywhere\n- spaces in the name of the source are OK\n- each possible random value goes on its own line\n\nThe difference between a `die` and a `deck` is that a `die` **can** repeat values in one run of the generator, while a `deck` **can not**.\n\n`generator` is the command that builds the widget. There are a lot of commands you can use inside it. \n\n- **new-row**: make a new row in the generator.\n- **print**: make a new cell in the row, and put text inside it. Terms inside `[brackets]` are taken to be the names of sources (dice or decks set before). Brackets can be nested.\n- **image**: like `print`, but it expects to get an image url. Any text after the url becomes a caption.\n- **style**: set the CSS attribute of the current row. Ex: `style height 200px`\n- **roll**: roll dice. Takes three values: number of dice to roll, sides per die, and bonus to apply. Ex: 2d6 + 1 → `roll 2 6 1`\n- **col-widths**: set widths of elements in the current row by ratio (uses flexbox).\n- **save**: saves the result of a template to a source with the given name. This is useful when you need to repeat the output of a template. This is a bit complicated, so here's an example:\n\n```\n    deck people\n    Alice\n    Bob\n\n    generator\n    save first [people]\n    save second [people]\n    print [first] said to [second] \"Hello [second]\"\n```\n\nThere are also embedded commands that can go in text passed to `print` and the like. They work by starting the label inside brackets with an exclamation point. Currently there are just two:\n\n- **roll**: Roll dice in-line. Ex: `print HP: [!r 1]` (rolls 1d6) `print STR: [!r 3 6 2]` (rolls 3d6+2)\n- **choose**: Choose from an in-line list. The first non-whitespace character is used as the delimiter. Ex: `print You see a [!c /wizard/fighter/thief/]`\n\n## Command Line Features\n\nYou can pass in the path of json files like so:\n\n    shesha -d file.json -c file2.json -t file3.shesha \"print this\"\n\nJSON files are assumed to be flat objects with keys that contain lists. To treat every key as a die use `-d` for Dice, to treat as a deck use `-c` for Cards, to read a template file using the same syntax as the web editor use `-t` (the generator function will be ignored). If you have the same key in multiple files, the contents of the key will be **appended**. \n\nArguments without a prefix are assumed to be templates for rendering and will be printed after interpolation.\n\n## Related Work / Similar Projects\n\n- [Tracery](https://github.com/galaxykate/tracery)\n- [Perchance ⚄︎](https://perchance.org/welcome)\n- [RiTa Context Free Grammars](http://www.rednoise.org/pdal/index.php?n=Main.Grammars)\n- [The Seventh Order of the Random Generator](http://www.lastgaspgrimoire.com/generators/the-seventh-order-of-the-random-generator/)\n- [Abulafia Random Generators](http://www.random-generator.com/index.php?title=Main_Page)\n- [RandomGen](http://orteil.dashnet.org/randomgen/)\n- [Ink](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md)\n\n## License\n\nWTFPL, do as you please.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolm%2Fshesha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolm%2Fshesha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolm%2Fshesha/lists"}