{"id":13734340,"url":"https://github.com/abossi/diffRgit","last_synced_at":"2025-05-08T10:31:25.804Z","repository":{"id":140155262,"uuid":"85468082","full_name":"abossi/diffRgit","owner":"abossi","description":"Create an HTML git diff widget using the diff2html library","archived":false,"fork":false,"pushed_at":"2017-03-20T17:18:24.000Z","size":109,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-28T23:08:15.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abossi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-19T10:37:46.000Z","updated_at":"2020-01-11T18:52:16.000Z","dependencies_parsed_at":"2024-01-06T14:03:17.462Z","dependency_job_id":null,"html_url":"https://github.com/abossi/diffRgit","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/abossi%2FdiffRgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abossi%2FdiffRgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abossi%2FdiffRgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abossi%2FdiffRgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abossi","download_url":"https://codeload.github.com/abossi/diffRgit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045710,"owners_count":21845763,"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-03T03:00:54.849Z","updated_at":"2025-05-08T10:31:25.536Z","avatar_url":"https://github.com/abossi.png","language":"R","funding_links":[],"categories":["UI Components"],"sub_categories":["Code Diff"],"readme":"# DiffRgit\n\nCreate an HTML git diff widget using the diff2html library.\n\n[![N|Solid](https://cldup.com/dTxpPi9lDf.thumb.png)](https://codepen.io/salc2/pen/gwdxrB)\n\n\n### Installation\n\nInstall the dependencies:\n\n```sh\n\u003e require(devtools)\n\u003e install_github(\"abossi/diffRgit\")\n```\n\n### Exemple\n\n```sh\n\u003e l_diff \u003c- \"diff --git a/../diff2widget/file1 b/../diff2widget/file2\\nindex ab63d51..eb01961 100644\\n--- a/../diff2widget/file1\\n+++ b/../diff2widget/file2\\n@@ -1,5 +1,4 @@\\n-hello!\\n+hello world!\\n Where is Bryan?\\n+Bryan is in the kitchen.\\n bye!\\n-\\n-oups!\"\n\n\u003e diffRgit(l_diff)\n```\n\nresult:\n\n![view.png](view.png)\n\n### Diff format\n\nTo generate the string 'l_diff', you can use:\n\n\n```sh\n\u003e l_diff \u003c- system(\"git diff [file1]\")\n\u003e l_diff \u003c- paste0(l_diff, collapse='\\n')\n\u003e diffRgit(l_diff)\n```\n\nto compare current file with the last commit.\n\n\n```sh\n\u003e l_diff \u003c- system(\"git diff [SHA] -- [file1]\")\n\u003e l_diff \u003c- paste0(l_diff, collapse='\\n')\n\u003e diffRgit(l_diff)\n```\n\nto compare current file with the [SHA] commit.\n\n\n```sh\n\u003e l_diff \u003c- system(\"git diff [SHA1] [SHA2] [file1]\")\n\u003e l_diff \u003c- paste0(l_diff, collapse='\\n')\n\u003e diffRgit(l_diff)\n```\n\nto compare current 2 commits.\n\n\n```sh\n\u003e l_diff \u003c- system(\"diff -u [file1] [file2]\")\n\u003e l_diff \u003c- paste0(l_diff, collapse='\\n')\n\u003e diffRgit(l_diff)\n```\n\nif you don't use git and you realy whant use this widget!\n\n### License\n\nLicense GPL3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabossi%2FdiffRgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabossi%2FdiffRgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabossi%2FdiffRgit/lists"}