{"id":13857742,"url":"https://github.com/yonicd/details","last_synced_at":"2025-04-12T19:46:39.532Z","repository":{"id":46553324,"uuid":"175480859","full_name":"yonicd/details","owner":"yonicd","description":"R Package to Create Details HTML Tag for Markdown and Package Documentation","archived":false,"fork":false,"pushed_at":"2025-02-01T21:17:21.000Z","size":23379,"stargazers_count":82,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T22:08:18.097Z","etag":null,"topics":["html","markdown","r","rmarkdown"],"latest_commit_sha":null,"homepage":"https://yonicd.github.io/details/","language":"R","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/yonicd.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-03-13T18:53:02.000Z","updated_at":"2025-03-22T10:54:40.000Z","dependencies_parsed_at":"2025-03-12T12:10:58.455Z","dependency_job_id":"0dd98aa0-1a48-41c8-90b6-d098f8d4af79","html_url":"https://github.com/yonicd/details","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2Fdetails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2Fdetails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2Fdetails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2Fdetails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yonicd","download_url":"https://codeload.github.com/yonicd/details/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"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":["html","markdown","r","rmarkdown"],"created_at":"2024-08-05T03:01:45.591Z","updated_at":"2025-04-12T19:46:39.511Z","avatar_url":"https://github.com/yonicd.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures\",\n  out.width = \"100%\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/details)](https://CRAN.R-project.org/package=details)\n[![downloads](http://cranlogs.r-pkg.org/badges/details)](https://CRAN.R-project.org/package=details)\n[![R-win build status](https://github.com/yonicd/details/workflows/R-win/badge.svg)](https://github.com/yonicd/details)\n[![R-mac build status](https://github.com/yonicd/details/workflows/R-mac/badge.svg)](https://github.com/yonicd/details)\n[![R-linux build status](https://github.com/yonicd/details/workflows/R-linux/badge.svg)](https://github.com/yonicd/details)\n[![Codecov test coverage](https://codecov.io/gh/yonicd/details/branch/master/graph/badge.svg)](https://app.codecov.io/gh/yonicd/details?branch=master)\n\u003c!-- badges: end --\u003e\n\n\n# details \u003cimg src=\"man/figures/logo.png\" align=\"right\" class=\"logo\" style=\"height:150px;\"/\u003e\n\nSuppose you're opening an issue in GitHub and there's a lot noisey logs that may be useful or you want to add the `sessionInfo()` to the end of the issue.\n\nRather than wrecking readability, wrapping it in a `\u003cdetails\u003e` tag is a great solution\n\n```md\n\u003cdetails\u003e\n \u003csummary\u003eSummary Goes Here\u003c/summary\u003e\n ...this is hidden, collapsable content...\n\u003c/details\u003e\n```\n\nDoing this manually every time is a pain. \n\n`details` is a package lets you create and customize details blocks for [markdown](#markdown) documents and [Roxygen2](#package-documentation) documentation within `R`.\n\n![](https://github.com/yonicd/details/raw/media/input/details.gif)\n\n## Installation\n\n### CRAN\n\n``` r\ninstall.packages(\"details\")\n```\n\n### Dev\n\n``` r\nremotes::install_github(\"yonicd/details\")\n```\n\n## Markdown\n\n### Input\n\nThe function `details::details` can handle inputs\n  \n  - R object with supported classes: \n    - `character`\n    - `data.frame`\n    - `tibble`\n    - `list`\n    - `device` (eg plots)\n    \n  - File paths will be identified internally and the lines will be read in automatically.\n\n### Output\n\nThe function `details::details` can output the result to\n\n  - console (default)\n  - clipboard via [clipr](https://github.com/mdlincoln/clipr)\n  - [file.editor](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/file.edit.html) useful when clipr not available\n\n### Examples\n\nOne the most popular uses for `details` is to paste the sessioninfo at the bottom of a GitHub issue.\n\n```{r}\nlibrary(details)\n\nsessioninfo::session_info()|\u003e\n  details::details(summary = 'current session info')\n```\n\nYou can also use the `knitr` chunk engine that is shipped with `details` to created outputs in `Rmarkdown` documents.\n\n````markdown\n`r ''````{details, echo = FALSE, details.summary = 'current session info'}\nsessioninfo::session_info()\n```\n````\n\n```{details, echo = FALSE, details.summary = 'current session info'}\nsessioninfo::session_info()\n```\n\nThere are a [number of objects](https://yonicd.github.io/details/articles/objects.html) that can be placed in a details block other than a character object. An example of a object is a device output such as a plot\n\n```{r}\ndetails(plot(x=mtcars$mpg,y=mtcars$wt), summary = 'My plot',imgur = interactive())\n```\n\n## Package Documentation\n\nMany times in documentation there is a lot to say, but you do not want to overwhelm the user. \n\nTo solve this we can use folding blocks in the documentation (which are then rendered into pkgdown website automatically)\n\n![](https://github.com/yonicd/details/raw/media/input/folding.gif)\n\n\n### Setup\n\nTo make it easy to set up the DESCRIPTION file of your package so you can use `details` macros run the following :\n\n``` r\nuse_details('PATH_TO_DESCRIPTION_FILE')\n```\n\nThis will append three elements to the DESCRIPTION file\n\n  - Imports: details\n  - RdMacros: details\n  - Roxygen: list(markdown = TRUE)\n\n### Usage\n\nYou can use this feature by wrapping documentation with the macros\n \n```\n\\foldstart{[SUMMARY TEXT]}\n\n#' DOCUMENTATION\n#' ...\n#' DOCUMENTATION\n\n\\foldend\n```\n\nThe `SUMMARY_TEXT` is optional, where the folded block will have a header of \u003csvg style=\"height:0.8em;top:.04em;position:relative;\" viewBox=\"0 0 192 512\"\u003e\u003cpath d=\"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z\"/\u003e\u003c/svg\u003e __SUMMARY TEXT__.\n\nThe default will display \u003csvg style=\"height:0.8em;top:.04em;position:relative;\" viewBox=\"0 0 192 512\"\u003e\u003cpath d=\"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z\"/\u003e\u003c/svg\u003e __details__. \n\nThese folded blocks can be inserted anywhere in the documentation, eg `@description`, `@param`, `@details`, `@return`, ....\n\n## Vignettes\n\nMore information can be found in the [articles](https://yonicd.github.io/details/) of the package site.\n  \n  - Creating a sessioninfo to paste into Github, Stackoverflow or Community Sites. \n  - Customizing the details output\n  - What R objects details can handle\n  - Using the details knitr chunk engine\n  - Using details in Roxygen2\n\n## Code of Conduct\n\nPlease note that the 'details' project is released with a\n[Contributor Code of Conduct](https://github.com/yonicd/details/blob/master/CODE_OF_CONDUCT.md).\nBy contributing to this project, you agree to abide by its terms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonicd%2Fdetails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonicd%2Fdetails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonicd%2Fdetails/lists"}