{"id":22731055,"url":"https://github.com/genentech/rd2markdown","last_synced_at":"2025-04-14T00:31:06.813Z","repository":{"id":39565007,"uuid":"466925416","full_name":"Genentech/rd2markdown","owner":"Genentech","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-23T16:41:52.000Z","size":5439,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-23T22:48:30.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Genentech.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":"2022-03-07T03:11:18.000Z","updated_at":"2024-10-23T16:39:17.000Z","dependencies_parsed_at":"2024-10-23T19:26:57.622Z","dependency_job_id":null,"html_url":"https://github.com/Genentech/rd2markdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Frd2markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Frd2markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Frd2markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Frd2markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genentech","download_url":"https://codeload.github.com/Genentech/rd2markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229117070,"owners_count":18022819,"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-12-10T19:19:16.992Z","updated_at":"2024-12-10T19:19:18.604Z","avatar_url":"https://github.com/Genentech.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: \n  github_document:\n    html_preview: false\n---\n\n```{r setup, include=FALSE, message=FALSE, warning=TRUE}\nknitr::opts_chunk$set(message = FALSE, warning = FALSE, fig.align = 'center', fig.path = \"man/figures/\")\n```\n\n```{r render_md_output, include=FALSE}\nmarkdown_output \u003c- function(x, ...) {\n  res \u003c- paste(\"\u003e\", strsplit(x, \"\\n\")[[1L]], collapse = \"\\n\")\n  knitr::asis_output(res)\n}\n```\n\n# rd2markdown\n\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rd2markdown)](https://cran.r-project.org/package=rd2markdown)\n[![R build status](https://github.com/Genentech/rd2markdown/workflows/R-CMD-check/badge.svg)](https://github.com/Genentech/rd2markdown/actions?query=workflow%3AR-CMD-check)\n[![Codecov test coverage](https://codecov.io/gh/Genentech/rd2markdown/branch/main/graph/badge.svg)](https://app.codecov.io/gh/Genentech/rd2markdown?branch=main)\n[![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/rd2markdown?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/rd2markdown)\n\n# Overview\n\nThe `rd2markdown` package provides a way to conveniently convert .Rd package\ndocumentation files into markdown files. Documentation can be acquired in\nvarious ways, for instance using the documentation page of an already installed\npackage, or by fetching it directly from the source file. The package aims to\nhelp other developers in presenting their work, by converting documentation of\ntheir packages to markdown files that later can be funneled into a report,\nREADME, and any others. Therefore there are countless different scenarios where\nthis tool might be useful. We plan to drive the development of `rd2markdown` in\na way it will address the needs of the R community.\n\nThe core logic behind the whole conversion is treating each rd tag as a separate\nclass. We take the documentation object and parse it layer by layer like an\nonion. Thanks to that, each tag receives a dedicated treatment so it can be\npresented basically according to the demand. On top of that, it makes the\npackage way more extensible, as adding the support of a new tag is essentially\njust implementing another method. \n\n# Installation\n\nInstall the development version from GitHub:\n\n```{r eval=FALSE}\nremotes::install_github(\"Genentech/rd2markdown\")\n```\n\nor latest CRAN version\n\n```{r eval=FALSE}\ninstall.packages(\"rd2markdown\")\n```\n\n# Examples\n\nBelow are some basic examples that show the core functionalities of the\n`rd2markdown`, its strong sides and possibilities it provides for the R\ncommunity.\n\n## Rendering from file path\n\n```{r, render=markdown_output, results='asis'}\nrd_example \u003c- system.file(\"examples\", \"rd_file_sample.Rd\", package = \"rd2markdown\")\nrd \u003c- rd2markdown::get_rd(file = rd_example)\nrd2markdown::rd2markdown(rd, fragments = c(\"title\", \"description\", \"details\"))\n```\n\n## Rendering from help alias\n\n```{r, render=markdown_output, results='asis'}\nrd2markdown::rd2markdown(\n  topic = \"rnorm\",\n  package = \"stats\",\n  fragments = c(\"title\", \"description\", \"usage\")\n)\n```\n\nTo see the examples showing the complexity of the package, please take a look at\nthe vignette attached in this package `The rd2markdown package intro`. You will\nfind there not only examples for all exported functions with various\ncombinations of parameters, but also the rationale for this package, why it was\ncreated, and what logic it follows.\n\n# Plans for the future development\n\nBelow is the list of our plans for the nearest future`;\n\n1. Publish to CRAN\n2. Bug fixes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Frd2markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenentech%2Frd2markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Frd2markdown/lists"}