{"id":13781397,"url":"https://github.com/sous-chefs/line","last_synced_at":"2026-04-20T12:13:51.792Z","repository":{"id":5847454,"uuid":"7063978","full_name":"sous-chefs/line","owner":"sous-chefs","description":"Development repository for the line cookbook","archived":false,"fork":false,"pushed_at":"2026-04-20T10:15:04.000Z","size":696,"stargazers_count":97,"open_issues_count":1,"forks_count":63,"subscribers_count":21,"default_branch":"main","last_synced_at":"2026-04-20T11:33:08.422Z","etag":null,"topics":["chef","chef-cookbook","chef-resource","hacktoberfest","line","managed-by-terraform"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/line","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sous-chefs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"sous-chefs"}},"created_at":"2012-12-08T04:40:21.000Z","updated_at":"2026-04-20T10:14:56.000Z","dependencies_parsed_at":"2023-10-28T05:31:09.901Z","dependency_job_id":"70b0d4de-7730-4727-95cf-ff9bc8566ce7","html_url":"https://github.com/sous-chefs/line","commit_stats":{"total_commits":488,"total_committers":50,"mean_commits":9.76,"dds":0.7663934426229508,"last_synced_commit":"e454db2c762f4685373710012bc79cfe8f33fa24"},"previous_names":["someara/line-cookbook"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/sous-chefs/line","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sous-chefs","download_url":"https://codeload.github.com/sous-chefs/line/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32046590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chef","chef-cookbook","chef-resource","hacktoberfest","line","managed-by-terraform"],"created_at":"2024-08-03T18:01:25.599Z","updated_at":"2026-04-20T12:13:51.760Z","avatar_url":"https://github.com/sous-chefs.png","language":"Ruby","funding_links":["https://opencollective.com/sous-chefs"],"categories":["Resources"],"sub_categories":["Files/Directories"],"readme":"# line cookbook\n\n[![Cookbook Version](https://img.shields.io/cookbook/v/line.svg)](https://supermarket.chef.io/cookbooks/line)\n[![CI State](https://github.com/sous-chefs/line/workflows/ci/badge.svg)](https://github.com/sous-chefs/line/actions?query=workflow%3Aci)\n[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)\n[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## Maintainers\n\nThis cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).\n\n## Motivation\n\nQuite often, the need arises to do line editing instead of managing an entire file with a template resource. This cookbook supplies various resources that will help you do this.\n\n## Limitations\n\n- The line resources processes the entire target file in memory. Trying to edit large files may fail.\n- The end of line processing was only tested using `\\n` and `\\r\\n`. Using other line endings very well may not work.\n- The end of line string used needs to match the actual end of line used in the file `\\n` and `\\r\\n` are used as the defaults but if they don't match the actual end of line used in the file the results will be weird.\n- Adding a line implies there is a separator on the previous line. Adding a line differs from appending characters.\n- Lines to be added should not contain EOL characters. The providers do not do multiline regex checks.\n- Missing file processing is the way it is by intention\n\n  - `add_to_list` do nothing, list not found so there is nothing to add to.\n  - `append_if_no_line` create file, add the line.\n  - `delete_from_list` do nothing, the list was not found which implies there is nothing to delete\n  - `delete_lines` do nothing, the line isn't there which implies there is nothing to delete\n  - `replace_or_add` create file, add the line\n  - `filter_lines` create file if the file changes\n\n- Chef client version 13 or greater is expected.\n\n## Resources\n\nFor more detailed information see the matching resource documentation:\n\n- [append_if_no_line](https://github.com/sous-chefs/line/blob/master/documentation/resources/append_if_no_line.md) - Add a missing line\n- [replace_or_add](https://github.com/sous-chefs/line/blob/master/documentation/resources/replace_or_add.md) - Replace a line that matches a pattern or add a missing line\n- [delete_lines](https://github.com/sous-chefs/line/blob/master/documentation/resources/delete_lines.md) - Delete lines that match a pattern\n- [add_to_list](https://github.com/sous-chefs/line/blob/master/documentation/resources/add_to_list.md) - Add an item to a list\n- [delete_from_list](https://github.com/sous-chefs/line/blob/master/documentation/resources/delete_from_list.md) - Delete an item from a list\n- [filter_lines](https://github.com/sous-chefs/line/blob/master/documentation/resources/filter_lines.md) - Supply a ruby proc or use a sample filter to edit lines.\n  The filter_lines resource supports multiple line modfications.\n\n### Sample filters\n\n- after: Insert lines after a matched line\n- before: Insert lines before a matched lined\n- between: Insert lines between matched lines\n- comment: Change lines to comments\n- delete_between: Delete the lines found between two patterns\n- missing: Add missing lines to a file\n- replace: Replace each instance of matched lines\n- replace_between: Replace lines between matched lines\n- stanza: Insert or change keys in files formatted in stanzas\n- substitute: Substitute text in lines matching a pattern\n\n## Authors\n\n- Contributor: Mark Gibbons\n- Contributor: Dan Webb\n- Contributor: Sean OMeara\n- Contributor: Antek S. Baranski\n\n## Contributors\n\nThis project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890\u0026button=false)\n\n### Backers\n\nThank you to all our backers!\n\n![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600\u0026avatarHeight=40)\n\n### Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website.\n\n![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Fline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsous-chefs%2Fline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Fline/lists"}