{"id":16301912,"url":"https://github.com/nxadm/ldifdiff","last_synced_at":"2025-10-24T13:23:51.206Z","repository":{"id":81457138,"uuid":"92819920","full_name":"nxadm/ldifdiff","owner":"nxadm","description":"A diff for LDIF files","archived":false,"fork":false,"pushed_at":"2021-06-19T08:21:16.000Z","size":97,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T14:11:43.512Z","etag":null,"topics":["data-consistency","diff","ldap","ldif","openldap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nxadm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-30T10:03:19.000Z","updated_at":"2022-12-08T13:03:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7148966-1a7a-41d9-9cb1-e45132b22c3f","html_url":"https://github.com/nxadm/ldifdiff","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxadm%2Fldifdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxadm%2Fldifdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxadm%2Fldifdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nxadm%2Fldifdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nxadm","download_url":"https://codeload.github.com/nxadm/ldifdiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245013746,"owners_count":20547175,"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":["data-consistency","diff","ldap","ldif","openldap"],"created_at":"2024-10-10T20:55:55.060Z","updated_at":"2025-10-24T13:23:46.158Z","avatar_url":"https://github.com/nxadm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ldifdiff\nldiffdiff is a fast Go (golang) library and executable that output the\ndifference between two LDIF files as a valid and importable LDIF (e.g.\nby your LDAP server). Binaries of the command implementation are \nprovided under [releases](https://github.com/nxadm/ldifdiff/releases).\n\n[![Build Status](https://travis-ci.org/nxadm/ldifdiff.svg?branch=master)](https://travis-ci.org/nxadm/ldifdiff)\n[![GoDoc](https://godoc.org/github.com/nxadm/ldifdiff?status.svg)](https://godoc.org/github.com/nxadm/ldifdiff)\n[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](http://www.gnu.org/licenses/lgpl-3.0)\n\n## Usage of the ldifdiff command\n```\n$ ./ldifdiff -h\nldifdiff v0.1.0 (Claudio Ramirez \u003cpub.claudio@gmail.com\u003e).\nCompare two LDIF files and output the differences as a valid LDIF.\nBugs to https://github.com/nxadm/ldifdiff.\n\n       _       _       _       _       _       _       _       _\n    _-(_)-  _-(_)-  _-(_)-  _-(\")-  _-(_)-  _-(_)-  _-(_)-  _-(_)-\n  *(___)  *(___)  *(___)  *%%%%%  *(___)  *(___)  *(___)  *(___)\n   // \\\\   // \\\\   // \\\\   // \\\\   // \\\\   // \\\\   // \\\\   // \\\\\n\nUsage:\n  ldifdiff \u003csource\u003e \u003ctarget\u003e [-i \u003cattributes\u003e ...] [-d]\n  ldifdiff -h\n  ldifdiff -v\nOptions:\n  -d, --dn\n    Only print DNs instead of a full LDIF.\n  -i \u003cattributes\u003e, --ignore \u003cattributes\u003e\n    Comma separated attribute list.\n    Multiple instances of this switch are allowed.\n  -h, --help\n    Show this screen.\n  -v, --version\n    Show version.\n```\n\n## Installation\n\nDownload the library using go:\n```go get github.com/nxadm/ldifdiff```\n\nImport the library into your project:\n```import \"github.com/nxadm/ldifdiff\"```\n\nCompile the ldiff cmd implementation:\n```cd cmd; go build -o ldifdiff ldifdiff.go```\n\n\n## API ##\n\nThe API is simple and provides four functions.\n\n```func Diff(sourceStr, targetStr string, ignoreAttr []string) (string, error)```\n\nDiff compares two LDIF strings (sourceStr and targetStr) and outputs the\ndifferences as a LDIF string. An array of attributes can be supplied.\nThese attributes will be ignored when comparing the LDIF strings. The\noutput is a string, a valid LDIF, and can be added to the _target_\ndatabase (the one that created targetStr) in order to make it equal to\nthe _source_ database (the one that created sourceStr). In case of\nfailure, an error is provided.\n\n\n```func DiffFromFiles(sourceFile, targetFile string, ignoreAttr []string) (string, error)```\n\nDiffFromFiles compares two LDIF files (sourceFile and targetFile) and\noutputs the differences as a LDIF string. An array of attributes can be\nsupplied. These attributes will be ignored when comparing the LDIF\nstrings. The output is a string, a valid LDIF, and can be added to the\n_target_ database (the one that created targetFile) in order to make it\nequal to the _source_ database (the one that created sourceFile). In\ncase of failure, an error is provided.\n\n```func ListDiffDn(sourceStr, targetStr string, ignoreAttr []string) ([]string, error)```\n\nListDiffDn compares two LDIF strings (sourceStr and targetStr) and\noutputs the differences as a list of affected DNs (Dintinguished Names).\nAn array of attributes can be supplied. These attributes will be ignored\nwhen comparing the LDIF strings. The output is a string slice. In case\nof failure, an error is provided.\n\n```func ListDiffDnFromFiles(sourceFile, targetFile string, ignoreAttr []string) ([]string, error)```\n\nListDiffDnFromFiles compares two LDIF files (sourceFile and\ntargetFileStr) and outputs the differences as a list of affected DNs\n(Dintinguished Names). An array of attributes can be supplied. These\nattributes will be ignored when comparing the LDIF strings. The output\nis a string slice. In case of failure, an error is provided.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxadm%2Fldifdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxadm%2Fldifdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxadm%2Fldifdiff/lists"}