{"id":17999548,"url":"https://github.com/ozum/replace-between","last_synced_at":"2025-09-22T09:18:32.813Z","repository":{"id":57353676,"uuid":"85037620","full_name":"ozum/replace-between","owner":"ozum","description":"CLI utility for replacing text between markers with text from a file or stdin.","archived":false,"fork":false,"pushed_at":"2019-11-06T21:10:41.000Z","size":77,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T09:22:56.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozum.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2017-03-15T06:33:52.000Z","updated_at":"2022-05-06T11:37:40.000Z","dependencies_parsed_at":"2022-09-19T10:31:20.362Z","dependency_job_id":null,"html_url":"https://github.com/ozum/replace-between","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozum%2Freplace-between","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozum%2Freplace-between/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozum%2Freplace-between/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozum%2Freplace-between/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozum","download_url":"https://codeload.github.com/ozum/replace-between/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245603838,"owners_count":20642893,"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-10-29T22:13:32.880Z","updated_at":"2025-09-22T09:18:27.771Z","avatar_url":"https://github.com/ozum.png","language":"JavaScript","readme":"# replace-between\n\nCLI utility for replacing text between markers with text from a file or stdin.\n\n# Usage\n\n```\nreplace-between --source API.md --target README.md --token API\n```\n\n# Example\n\nTo put API in your `README.md`, you can put text generated by `jsdoc2md` between `\u003c!--- API BEGIN ---\u003e` and `\u003c!--- API END ---\u003e`.  \n\n```\n$ jsdoc2md index.js | replace-between --target README.md --token API\n```\n\nA sample `README.md` for above command could be as below: \n\n```md\n# My Module\n\nLovely description.\n\n# Details\n\nDetails of my module\n\n# API\n\n\u003c!--- API BEGIN ---\u003e\n\n\n\u003c!--- API END ---\u003e\n```\n\n\n# Options\n\n| Option  | Req |Description |\n|:--------|:----|------------|\n| token   |  ✓  | Token text to look for between start and end comment. BEGIN and END words are added automatically. |\n| target  |  ✓  | Target file to replace text in. |\n| source  |     | Source file to get replacement text from. If not provided STDIN is used instead. |\n| comment |     | Predefined comment types to be used for replacement markers. (i.e. 'markdown' for `\u003c!---` `---\u003e`. If not provided, it is tried to be get from target file extension. |\n| begin   |     | Beginning of the comment syntax. i.e `\u003c!---` for markdown. |\n| end     |     | End of the comment syntax. i.e `---\u003e` for markdown. |\n\n# Predefined Comment Strings\n\nPredefined open and close tags are used for known file extensions if they are not overridden by `begin`, `end` or `comment` options. \n\n| Extension | Name        | Open    | Close  |\n|-----------|-------------|---------|--------|\n| md        | Markdown    | `\u003c!---` | `---\u003e` |\n| js        | Javascript  | `/*`    | `*/`   |\n| html      | HTML        | `\u003c!--`  | `--\u003e`  |\n| css       | CSS         | `/*`    | `*/`   |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozum%2Freplace-between","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozum%2Freplace-between","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozum%2Freplace-between/lists"}