{"id":14066507,"url":"https://github.com/s-fleck/sifr","last_synced_at":"2025-07-26T15:32:05.752Z","repository":{"id":89608478,"uuid":"130039550","full_name":"s-fleck/sifr","owner":"s-fleck","description":"Sarch and replace in files","archived":false,"fork":false,"pushed_at":"2023-10-05T07:54:50.000Z","size":59,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-01T12:47:17.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/s-fleck.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-04-18T09:37:37.000Z","updated_at":"2024-04-02T08:58:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"0aa28008-6312-434a-96e9-1c4432de25be","html_url":"https://github.com/s-fleck/sifr","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/s-fleck%2Fsifr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fsifr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fsifr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fsifr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-fleck","download_url":"https://codeload.github.com/s-fleck/sifr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227692777,"owners_count":17805175,"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-08-13T07:05:08.234Z","updated_at":"2024-12-02T07:50:21.742Z","avatar_url":"https://github.com/s-fleck.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\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 = \"140%\"\n)\n```\n# sifr: search in files \n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n\u003c!-- badges: end --\u003e\n\nsifr is a tool for searching text strings and regular expression patterns \nrecursively in directory trees from within R. It is mainly a convenience\nutility for **interactive use**.\n\nsifr supports colored console \noutput, RStudio source markers, and can also return the search results as\na `data.frame` for further processing. In addition, sifr provides \n`sed_replace()` on supported platforms (such as Linux, BSD, macOS) for replacing \nregex patterns across directory trees via [sed](https://en.wikipedia.org/wiki/Sed).\n\n\n## Installation\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"s-fleck/sifr\")\n```\n## Example\n\n```{r example}\nlibrary(sifr)\n\ntf \u003c- tempfile(fileext = \".csv\")\nwrite.csv(cars, tf)\n\nx \u003c- sif(\"26\", dir = dirname(tf), markers = FALSE, path_pattern = \".*\\\\.csv$\")\nprint(x)\nas.data.frame(x)\n\n\nsed_replace(\"26\", \"twentysix\", dir = dirname(tf), path_pattern = \".*\\\\.csv$\")\nsif(\"26\", dir = dirname(tf), markers = FALSE, path_pattern = \".*\\\\.csv$\")\nsif(\"twentysix\", dir = dirname(tf), markers = FALSE, path_pattern = \".*\\\\.csv$\")\nunlink(tf)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-fleck%2Fsifr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-fleck%2Fsifr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-fleck%2Fsifr/lists"}