{"id":23231676,"url":"https://github.com/danielduarte/diffsplit","last_synced_at":"2025-07-27T20:41:58.092Z","repository":{"id":57164457,"uuid":"268894351","full_name":"danielduarte/diffsplit","owner":"danielduarte","description":"Easy split of .diff \u0026 .patch into its files","archived":false,"fork":false,"pushed_at":"2020-06-20T19:57:17.000Z","size":23,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-28T17:20:20.121Z","etag":null,"topics":["cli","diff","patch","split","tool","unified-format"],"latest_commit_sha":null,"homepage":"","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/danielduarte.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":"2020-06-02T19:49:34.000Z","updated_at":"2024-03-21T03:42:47.000Z","dependencies_parsed_at":"2022-09-12T01:00:53.478Z","dependency_job_id":null,"html_url":"https://github.com/danielduarte/diffsplit","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/danielduarte%2Fdiffsplit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielduarte%2Fdiffsplit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielduarte%2Fdiffsplit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielduarte%2Fdiffsplit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielduarte","download_url":"https://codeload.github.com/danielduarte/diffsplit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230363948,"owners_count":18214718,"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":["cli","diff","patch","split","tool","unified-format"],"created_at":"2024-12-19T02:15:33.580Z","updated_at":"2024-12-19T02:15:34.132Z","avatar_url":"https://github.com/danielduarte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @tandil/diffsplit\n[![NPM Package Version](https://img.shields.io/npm/v/@tandil/diffsplit)](https://www.npmjs.com/package/@tandil/diffsplit)\n[![License](https://img.shields.io/npm/l/@tandil/diffsplit?color=%23007ec6)](https://github.com/danielduarte/diffsplit/blob/master/LICENSE)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-blue.svg)](https://conventionalcommits.org)\n\nEasy split of .diff \u0026 .patch into its files\n\n## What is this?\n\nThis CLI utility splits .diff or .patch files in [unified format](https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html) into parts **by file** without deleting or overwriting anything.\n\nSee a simple [example](#example)\n\n## Installation\n\n```Shell\nnpm i -g @tandil/diffsplit\n```\n\n_Note that this requires Node.js installed._\n\n## Usage\n\nIn your terminal\n\n```Shell\ndiffsplit file1.diff file2.diff [... more files]\n```\n\n## Example\n\nSuppose you have a diff file `mypatch.diff` you created from a git diff and it includes modifications for 3 files:\n\n```Diff\ndiff --git a/es6.txt b/es6.txt\nindex ca683c3..f1a9a31 100644\n--- a/es6.txt\n+++ b/es6.txt\n@@ -1,4 +1,6 @@\n-ECMAScript is a scripting-language specification standardized by Ecma International.\n-It was created to standardize JavaScript to help foster multiple independent implementations.\n-\n+ECMAScript\n+----------\n \n+It is a scripting-language specification standardized by Ecma International.\n+It was created to standardize JavaScript to help foster multiple independent implementations.\n+It was initially created for web browsers.\ndiff --git a/life.txt b/life.txt\nindex 39257de..6410213 100644\n--- a/life.txt\n+++ b/life.txt\n@@ -1,7 +1,10 @@\n-Life / From Wikipedia, the free encyclopedia\n+Life\n+----\n \n Life is a characteristic that distinguishes physical entities that have biological processes,\n such as signaling and self-sustaining processes, from those that do not, either because such\n functions have ceased (they have died), or because they never had such functions and are\n classified as inanimate. Various forms of life exist, such as plants, animals, fungi, protists,\n archaea, and bacteria. Biology is the science concerned with the study of life.\n+\n+Source: From Wikipedia, the free encyclopedia\ndiff --git a/lorem.txt b/lorem.txt\nindex 83449d4..733ae45 100644\n--- a/lorem.txt\n+++ b/lorem.txt\n@@ -1,10 +1,13 @@\n Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n+\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,\n when an unknown printer took a galley of type and scrambled it to make a type\n specimen book.\n \n It has survived not only five centuries, but also the leap into electronic\n-typesetting, remaining essentially unchanged. It was popularised in the 1960s\n+typesetting, remaining essentially unchanged.\n+\n+It was popularised in the 1960s\n with the release of Letraset sheets containing Lorem Ipsum passages, and more\n recently with desktop publishing software like Aldus PageMaker including\n versions of Lorem Ipsum.\n```\n\nJust running\n\n```Shell\ndiffsplit mypatch.diff\n```\n\nYou will get the output:\n\n```\nProcessing file: \"mypatch.patch\"\n OK:\n  Split in 3 files\n```\n\nand 3 files will be created with the individual diffs for each of the files in your patch:\n\n```\nmypatch_0001.patch\nmypatch_0002.patch\nmypatch_0003.patch\n```\n\nDon't worry, this command will not overwrite existing files.\nIf you had already a file with one of those names, a suffix will be added.\nLets say you had already a file named `mypatch_0003.diff`, the created files would be:\n\n```\nmypatch_0001.diff\nmypatch_0002.diff\nmypatch_0003-1.diff\n```\n\nIn this example, the resulting files will content:\n\n**mypatch_0001.patch**\n```Diff\ndiff --git a/es6.txt b/es6.txt\nindex ca683c3..f1a9a31 100644\n--- a/es6.txt\n+++ b/es6.txt\n@@ -1,4 +1,6 @@\n-ECMAScript is a scripting-language specification standardized by Ecma International.\n-It was created to standardize JavaScript to help foster multiple independent implementations.\n-\n+ECMAScript\n+----------\n \n+It is a scripting-language specification standardized by Ecma International.\n+It was created to standardize JavaScript to help foster multiple independent implementations.\n+It was initially created for web browsers.\n```\n\n**mypatch_0002.patch**\n```Diff\ndiff --git a/life.txt b/life.txt\nindex 39257de..6410213 100644\n--- a/life.txt\n+++ b/life.txt\n@@ -1,7 +1,10 @@\n-Life / From Wikipedia, the free encyclopedia\n+Life\n+----\n \n Life is a characteristic that distinguishes physical entities that have biological processes,\n such as signaling and self-sustaining processes, from those that do not, either because such\n functions have ceased (they have died), or because they never had such functions and are\n classified as inanimate. Various forms of life exist, such as plants, animals, fungi, protists,\n archaea, and bacteria. Biology is the science concerned with the study of life.\n+\n+Source: From Wikipedia, the free encyclopedia\n```\n\n**mypatch_0003.patch**\n```Diff\ndiff --git a/lorem.txt b/lorem.txt\nindex 83449d4..733ae45 100644\n--- a/lorem.txt\n+++ b/lorem.txt\n@@ -1,10 +1,13 @@\n Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n+\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,\n when an unknown printer took a galley of type and scrambled it to make a type\n specimen book.\n \n It has survived not only five centuries, but also the leap into electronic\n-typesetting, remaining essentially unchanged. It was popularised in the 1960s\n+typesetting, remaining essentially unchanged.\n+\n+It was popularised in the 1960s\n with the release of Letraset sheets containing Lorem Ipsum passages, and more\n recently with desktop publishing software like Aldus PageMaker including\n versions of Lorem Ipsum.\n```\n\n## Having issues?\n\nFeel free to report any issues or feature request in [Github repo](https://github.com/danielduarte/diffsplit/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielduarte%2Fdiffsplit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielduarte%2Fdiffsplit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielduarte%2Fdiffsplit/lists"}