{"id":13735464,"url":"https://github.com/rstudio/nomnoml","last_synced_at":"2025-05-15T11:09:12.915Z","repository":{"id":40262869,"uuid":"152687387","full_name":"rstudio/nomnoml","owner":"rstudio","description":"Sassy 'UML' Diagrams for R","archived":false,"fork":false,"pushed_at":"2024-12-11T13:24:32.000Z","size":5707,"stargazers_count":220,"open_issues_count":2,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-10T06:38:39.564Z","etag":null,"topics":["diagrams","htmlwidgets","nomnoml","r","rstats","uml"],"latest_commit_sha":null,"homepage":"https://rstudio.github.io/nomnoml/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rstudio.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-12T03:11:05.000Z","updated_at":"2025-03-22T10:36:57.000Z","dependencies_parsed_at":"2023-11-18T15:03:10.688Z","dependency_job_id":"592c5d16-c14c-4bfc-8bab-4d6ad768c46e","html_url":"https://github.com/rstudio/nomnoml","commit_stats":{"total_commits":176,"total_committers":6,"mean_commits":"29.333333333333332","dds":"0.22159090909090906","last_synced_commit":"b93049c68d40de1cea333365c6c39648a08eddda"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fnomnoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fnomnoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fnomnoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fnomnoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstudio","download_url":"https://codeload.github.com/rstudio/nomnoml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328386,"owners_count":22052632,"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":["diagrams","htmlwidgets","nomnoml","r","rstats","uml"],"created_at":"2024-08-03T03:01:07.170Z","updated_at":"2025-05-15T11:09:12.900Z","avatar_url":"https://github.com/rstudio.png","language":"JavaScript","readme":"---\noutput:\n  github_document:\n    fig_width: 4\n    fig_height: 1\nformat: gfm\ndefault-image-extension: \"\"\n---\n\n```{r setup, include=FALSE}\nlibrary(nomnoml)\nknitr::opts_chunk$set(eval = TRUE)\nknitr::opts_chunk$set(fig.path = \"man/figures/readme/\", dev = \"png\")\n```\n\n# nomnoml \u003cimg src='man/figures/logo.png' align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/nomnoml)](https://CRAN.R-project.org/package=nomnoml)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/nomnoml)](https://www.r-pkg.org/pkg/nomnoml)\n[![R-CMD-check](https://github.com/rstudio/nomnoml/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/nomnoml/actions)\n[![Codecov test coverage](https://codecov.io/gh/rstudio/nomnoml/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/nomnoml?branch=main)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n\u003c!-- badges: end --\u003e\n\n\n**nomnoml** provides an R interface to [nomnoml.js](https://www.nomnoml.com/), a tool for drawing sassy UML diagrams based on syntax with customizable styling.\n\n## Installation\n\nInstall from CRAN:\n\n```{r eval=FALSE}\ninstall.packages(\"nomnoml\")\n```\n\nOr from GitHub using:\n\n```r\ninstall.packages(\"remotes\")\nremotes::install_github(\"rstudio/nomnoml\")\n```\n\n**You need a chromium based browser installed on your system**\n\nIn previous releases of `nomnoml` (prior to v0.3.0) we used the `phantom.js` headless browser to capture screenshots.  In version 0.3.0 we switched to using `webshot2`.\n\nThis means you need a chromium-based browser, e.g. Chromium itself, Chrome, Edge, Vivaldi, Brave, or Opera.\n\n## Getting Started\n\nYou can create your first diagram by running:\n\n```{r eval=FALSE}\nnomnoml::nomnoml(\"[Hello]-[World!]\")\n```\n\n\n```{nomnoml nomnoml-simple, width=\"250px\", height=\"75px\", echo=FALSE}\n[Hello]-[World!]\n```\n\nTo make the diagram flow vertically, the default at [nomnoml.com](https://www.nomnoml.com/), add the [direction](https://github.com/rstudio/nomnoml/issues/5) directive:\n\n```{nomnoml nomnoml-vertical, width=\"200px\", height=\"200px\", echo=TRUE}\n#direction: down\n[Hello]-[World!]\n```\n\nYou can also use `nomnoml` in R Markdown:\n\n````markdown\n---\ntitle: \"A Diagram\"\noutput: html_document\n---\n\n`r ''````{r, setup, include=FALSE}\nlibrary(nomnoml)\n```\n\n`r ''````{nomnoml}\n#stroke: orange\n#.box: fill=#8f8 dashed visual=ellipse\n\n[A]-[B]-[\u003cbox\u003eC]\n```\n````\n\n```{nomnoml nomnoml-multiline, width=\"300px\", height=\"100px\", echo=FALSE}\n#stroke: orange\n#.highlight: fill=#8f8 dashed visual=ellipse\n\n[A]-[B]-[\u003chighlight\u003eC]\n```\n\n### SVG\n\nTo render using SVG, add `svg = TRUE`\n\n\n```{r, eval=FALSE}\nnomnoml(diagram, svg = TRUE)\n```\n\n\nTo render a `nomnoml` chunk in R Markdown, add `svg=TRUE` to the chunk options\n\n\n````markdown\n`r ''````{nomnoml, svg=TRUE}\n#stroke: orange\n#.box: fill=#8f8 dashed visual=ellipse\n\n[A]-[B]-[\u003cbox\u003eC]\n```\n````\n\n\n```{nomnoml nomnoml-svg, width=\"400px\", height=\"100px\", svg=TRUE, echo=FALSE}\n#stroke: orange\n#.highlight: fill=#8f8 dashed visual=ellipse\n\n[A]-[B]-[\u003chighlight\u003eC]\n```\n\n\n\n### Advanced\n\nNotice that much more complex diagrams can be designed using `nomnoml` by\ncombining association types, classifier types, directives and custom \nclassifier styles.\n\n```{nomnoml nomnoml-decorator, width=\"250px\", height=\"250px\", svg=TRUE}\n#stroke: #a86128\n#direction: down\n[\u003cframe\u003eDecorator pattern|\n  [\u003cabstract\u003eComponent||+ operation()]\n  [Client] depends --\u003e [Component]\n  [Decorator|- next: Component]\n  [Decorator] decorates -- [ConcreteComponent]\n  [Component] \u003c:- [Decorator]\n  [Component] \u003c:- [ConcreteComponent]\n]\n```\n\n\n## Nomnoml documentation\n\n### Association types\n\n    -    association\n    -\u003e   association\n    \u003c-\u003e  association\n    --\u003e  dependency\n    \u003c--\u003e dependency\n    -:\u003e  generalization\n    \u003c:-  generalization\n    --:\u003e implementation\n    \u003c:-- implementation\n    +-   composition\n    +-\u003e  composition\n    o-   aggregation\n    o-\u003e  aggregation\n    -o)  ball and socket\n    o\u003c-) ball and socket\n    -\u003eo  ball and socket\n    --   note\n    -/-  hidden\n    _\u003e   weightless edge\n    __   weightless dashed edge\n\n### Classifier types\n\n    [name]\n    [\u003cabstract\u003e name]\n    [\u003cinstance\u003e name]\n    [\u003creference\u003e name]\n    [\u003cnote\u003e name]\n    [\u003cpackage\u003e name]\n    [\u003cframe\u003e name]\n    [\u003cdatabase\u003e name]\n    [\u003cpipe\u003e name]\n    [\u003cstart\u003e name]\n    [\u003cend\u003e name]\n    [\u003cstate\u003e name]\n    [\u003cchoice\u003e name]\n    [\u003csync\u003e name]\n    [\u003cinput\u003e name]\n    [\u003clollipop\u003e lollipop]\n    [\u003csender\u003e name]\n    [\u003csocket\u003e socket]\n    [\u003creceiver\u003e name]\n    [\u003ctransceiver\u003e name]\n    [\u003cactor\u003e name]\n    [\u003cusecase\u003e name]\n    [\u003clabel\u003e name]\n    [\u003chidden\u003e name]\n    [\u003ctable\u003e name| a | 5 || b | 7]\n    \n\n### Directives\n\n    #import: my-common-styles.nomnoml\n    #arrowSize: 1\n    #bendSize: 0.3\n    #direction: down | right\n    #gutter: 5\n    #edgeMargin: 0\n    #gravity: 1\n    #edges: hard | rounded\n    #background: transparent\n    #fill: #eee8d5; #fdf6e3\n    #fillArrows: false\n    #font: Calibri\n    #fontSize: 12\n    #leading: 1.25\n    #lineWidth: 3\n    #padding: 8\n    #spacing: 40\n    #stroke: #33322E\n    #title: filename\n    #zoom: 1\n    #acyclicer: greedy\n    #ranker: network-simplex | tight-tree | longest-path\n\n\nDirectives only available when using the command line interface\n\n    #import: my-common-styles.nomnoml\n\n### Custom classifier styles\n\nA directive that starts with \".\" define a classifier style.\n\n    #.box: fill=#88ff88\n    #.blob: fill=pink visual=ellipse italic bold dashed\n    [\u003cbox\u003e GreenBox]\n    [\u003cblob\u003e HideousBlob]\n\nAvailable key/value pairs:\n\n    fill=(any css color)\n    \n    stroke=(any css color)\n    \n    align=center\n    align=left\n    \n    direction=right\n    direction=down\n    \n    visual=actor\n    visual=class\n    visual=database\n    visual=ellipse\n    visual=end\n    visual=frame\n    visual=hidden\n    visual=input\n    visual=none\n    visual=note\n    visual=package\n    visual=receiver\n    visual=rhomb\n    visual=roundrect\n    visual=sender\n    visual=start\n    visual=table\n    visual=transceiver\n\nAvailable modifiers are\n\n    center\n    bold\n    underline\n    italic\n    dashed\n    empty\n\n","funding_links":[],"categories":["Visualization","JavaScript"],"sub_categories":["Diagrams"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fnomnoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstudio%2Fnomnoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fnomnoml/lists"}