{"id":13398434,"url":"https://github.com/jeffkaufman/icdiff","last_synced_at":"2025-05-13T16:04:09.914Z","repository":{"id":1000353,"uuid":"812328","full_name":"jeffkaufman/icdiff","owner":"jeffkaufman","description":"improved colored diff","archived":false,"fork":false,"pushed_at":"2025-03-25T15:36:47.000Z","size":217,"stargazers_count":4226,"open_issues_count":23,"forks_count":174,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-04-22T11:36:41.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.jefftk.com/icdiff","language":"Python","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/jeffkaufman.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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":"2010-08-02T13:55:38.000Z","updated_at":"2025-04-19T07:05:42.000Z","dependencies_parsed_at":"2023-07-06T01:55:44.939Z","dependency_job_id":"d4ca92e7-c230-4a77-b47b-a0e6ab59cedf","html_url":"https://github.com/jeffkaufman/icdiff","commit_stats":{"total_commits":169,"total_committers":53,"mean_commits":3.188679245283019,"dds":0.5207100591715976,"last_synced_commit":"c958b989d685e5b9de3a948cf2175aac8db2e4df"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffkaufman%2Ficdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffkaufman%2Ficdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffkaufman%2Ficdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffkaufman%2Ficdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffkaufman","download_url":"https://codeload.github.com/jeffkaufman/icdiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590484,"owners_count":21772934,"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-07-30T19:00:25.940Z","updated_at":"2025-05-05T22:45:36.464Z","avatar_url":"https://github.com/jeffkaufman.png","language":"Python","funding_links":[],"categories":["Python","语言资源库","Tool","Source Code","Git Interfaces"],"sub_categories":["python","TUI Tool","Diff Enhancers"],"readme":"# Icdiff\n\nImproved colored diff\n\n![screenshot](https://www.jefftk.com/icdiff-css-demo.png)\n\n## Installation\n\nDownload the [latest](https://github.com/jeffkaufman/icdiff/tags) `icdiff` and put it on your PATH.\n\nAlternatively, install with packaging tools:\n\n```\n# pip\npip install icdiff\n\n# apt\nsudo apt install icdiff\n\n# homebrew\nbrew install icdiff\n\n# aur\nyay -S icdiff\n\n# nix\nnix-env -i icdiff\n```\n\n## Usage\n\n```sh\nicdiff [options] left_file right_file\n```\n\nShow differences between files in a two column view.\n\n### Options\n\n```\n  --version             show program's version number and exit\n  -h, --help            show this help message and exit\n  --cols=COLS           specify the width of the screen. Autodetection is Unix\n                        only\n  --encoding=ENCODING   specify the file encoding; defaults to utf8\n  -E MATCHER, --exclude-lines=MATCHER\n                        Do not diff lines that match this regex. Not\n                        compatible with the 'line-numbers' option\n  --head=HEAD           consider only the first N lines of each file\n  -H, --highlight       color by changing the background color instead of the\n                        foreground color.  Very fast, ugly, displays all\n                        changes\n  -L LABELS, --label=LABELS\n                        override file labels with arbitrary tags. Use twice,\n                        one for each file\n  -N, --line-numbers    generate output with line numbers. Not compatible with\n                        the 'exclude-lines' option.\n  --no-bold             use non-bold colors; recommended for solarized\n  --no-headers          don't label the left and right sides with their file\n                        names\n  --output-encoding=OUTPUT_ENCODING\n                        specify the output encoding; defaults to utf8\n  -r, --recursive       recursively compare subdirectories\n  -s, --report-identical-files\n                        report when two files are the same\n  --show-all-spaces     color all non-matching whitespace including that which\n                        is not needed for drawing the eye to changes.  Slow,\n                        ugly, displays all changes\n  --tabsize=TABSIZE     tab stop spacing\n  -t, --truncate        truncate long lines instead of wrapping them\n  -u, --patch           generate patch. This is always true, and only exists\n                        for compatibility\n  -U NUM, --unified=NUM, --numlines=NUM\n                        how many lines of context to print; can't be combined\n                        with --whole-file\n  -W, --whole-file      show the whole file instead of just changed lines and\n                        context\n  --strip-trailing-cr   strip any trailing carriage return at the end of an\n                        input line\n  --color-map=COLOR_MAP\n                        choose which colors are used for which items. Default\n                        is --color-map='add:green_bold,change:yellow_bold,desc\n                        ription:blue,meta:magenta,separator:blue,subtract:red_\n                        bold'.  You don't have to override all of them:\n                        '--color-map=separator:white,description:cyan\n```\n\n## Using with Git\n\nTo see what it looks like, try:\n\n```sh\ngit difftool --extcmd icdiff\n```\n\nTo install this as a tool you can use with Git, copy\n`git-icdiff` into your PATH and run:\n\n```sh\ngit icdiff\n```\n\nYou can configure `git-icdiff` in Git's config:\n\n```\ngit config --global icdiff.options '--highlight --line-numbers'\n```\n\n## Using with subversion\n\nTo try it out, run:\n\n```sh\nsvn diff --diff-cmd icdiff\n```\n\n## Using with Mercurial\n\nAdd the following to your `~/.hgrc`:\n\n```sh\n[extensions]\nextdiff=\n\n[extdiff]\ncmd.icdiff=icdiff\nopts.icdiff=--recursive --line-numbers\n```\n\nOr check more [in-depth setup instructions](https://ianobermiller.com/blog/2016/07/14/side-by-side-diffs-for-mercurial-hg-icdiff-revisited/).\n\n## Setting up a dev environment\n\nCreate a virtualenv and install the dev dependencies.\nThis is not needed for normal usage.\n\n```sh\nvirtualenv venv\nsource venv/bin/activate\npip install -r requirements-dev.txt\n```\n\n## Running tests\n\n```sh\n./test.sh python3\n```\n\n## Making a release\n\n- Update ChangeLog with all the changes since the last release\n- Update `__version__` in `icdiff`\n- Run tests, make sure they pass\n- `git commit -a -m \"release ${version}\"`\n- `git push`\n- `git tag release-${version}`\n- `git push origin release-${version}`\n- A GitHub Action should be triggered due to the release tag being pushed, and will upload to PyPI.\n\n## License\n\nThis file is derived from `difflib.HtmlDiff` which is under [license](https://www.python.org/download/releases/2.6.2/license/).\nI release my changes here under the same license. This is GPL compatible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffkaufman%2Ficdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffkaufman%2Ficdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffkaufman%2Ficdiff/lists"}