{"id":22713576,"url":"https://github.com/program--/logdec","last_synced_at":"2025-03-29T22:44:00.707Z","repository":{"id":107794151,"uuid":"411034177","full_name":"program--/logdec","owner":"program--","description":"An R :package: for output using comments","archived":false,"fork":false,"pushed_at":"2021-10-10T10:29:03.000Z","size":114,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T00:27:46.541Z","etag":null,"topics":["logging","output","package","r","verbosity"],"latest_commit_sha":null,"homepage":"https://logdec.justinsingh.me","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/program--.png","metadata":{"files":{"readme":"README.Rmd","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-27T20:31:27.000Z","updated_at":"2023-02-09T09:02:40.000Z","dependencies_parsed_at":"2023-04-07T09:26:01.492Z","dependency_job_id":null,"html_url":"https://github.com/program--/logdec","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/program--%2Flogdec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Flogdec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Flogdec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Flogdec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/program--","download_url":"https://codeload.github.com/program--/logdec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254097,"owners_count":20747948,"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":["logging","output","package","r","verbosity"],"created_at":"2024-12-10T14:09:35.424Z","updated_at":"2025-03-29T22:44:00.698Z","avatar_url":"https://github.com/program--.png","language":"R","funding_links":[],"categories":[],"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, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# logdec - Verbosity using comments \u003ca href=\"https://github.com/program--/logdec\"\u003e\u003cimg src=\"man/figures/logo.svg\" align=\"right\" height=\"200\"/\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/logdec)](https://CRAN.R-project.org/package=logdec)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)]()\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\u003c!-- badges: end --\u003e\n\n\n\n## Installation\n\nYou can install the development version from GitHub using `pak` or `remotes`:\n\n``` r\n# With `pak`\npak::pkg_install(\"program--/logdec\")\n\n# With `remotes`\nremotes::install_github(\"program--/logdec\")\n```\n\n## Usage\n\nYou can start using `logdec` quickly by adding `logdec::output()` to the top\nof your `.R` file. Then, start adding comments using the `#\u003e\u003e` tag. Once your\nlogdec comments are in place, you can `source` the file as normal! Below is a clear\nexample of how logdec functions:\n\n``` r\n# example.R\noptions(logdec.engine = \"cli\")\nlogdec::output()\n\n#\u003e\u003e Hello from {.pkg logdec}!\nSys.sleep(3)\n#\u003e\u003e @info {.strong logdec} allows you to create output messages {cli::col_blue(\\\"directly\\\")} from comments!\nSys.sleep(3)\n#\u003e\u003e @info All you need to do is install {.strong logdec}, then call {.fn logdec::output} at the top of your R file.\nSys.sleep(3)\n#\u003e\u003e @info You can even use glue to pass variables to your comments! Here's some random value from {.fn rnorm}: {.val {rnorm(1)}}\nSys.sleep(3)\n#\u003e\u003e @warning However, there are {cli::col_yellow(\\\"some limitations\\\")}, such as with console and package development use.\nSys.sleep(3)\n#\u003e\u003e @success There are ways to work around this though, such as with the {.code %\u003e\u003e%} operator though!\nSys.sleep(3)\n#\u003e\u003e Make your code output a bit easier to manage, with {.pkg logdec}! {cli::col_red(cli::symbol$heart)}\n```\n\n![](man/figures/example.svg)\n\nIf you notice, at the top of `example.R`, you can set the `logdec.engine` option\nto one of the support engines. You can list all engines by calling:\n\n```{r}\nlogdec::list_engines()\n```\n\n## Limitations\nSince `logdec` attempts to read a file for specific comments, **console/interactive use is not available**.\nHowever, to work around this issue, `logdec` includes an `extraction` operator (`%\u003e\u003e%`). This operator works\nin either the conventional operator style, or in a functional style. See below for an example:\n\n```r\noptions(logdec.engine = \"cli\")\nlibrary(logdec)\n\n# Conventional Use:\n# --------------------\n\"@info\" %\u003e\u003e% \"Output some form of informational message\"\n#\u003e ℹ Output some form of informational message\n\n\"\" %\u003e\u003e% \"This will also work, but is a bit odd\"\n#\u003e → This will also work, but is a bit odd\n\n# Functional Use:\n# --------------------\n`%\u003e\u003e%`(\"@success Successfully outputted this!\")\n#\u003e ✔ Successfully outputted this!\n\n`%\u003e\u003e%`(\"@success\", \"Outputted again!\")\n#\u003e ✔ Outputted again!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogram--%2Flogdec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogram--%2Flogdec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogram--%2Flogdec/lists"}