Package: ufodiff
ufodiff is a command line UFO source file diff tool for collaborative typeface development projects.It examines git repositories for changes to files that are part of the UFO source spec only (i.e. all file changes in the repository external to the UFO source code are not considered by the tool). It supports reporting of UFO source file additions, deletions, and modifications as well as colored and uncolored text diffs for UFO source files that were modified between branches or across one or more commits.UFO versions 2 and 3 are fully supported in the current release.ContentsContentsInstallQuickstart ExamplesPlain TextMarkdownJSONColored text diffFor terminals with ANSI color code supportUncolored text diffUsageView Results in TerminalPiping Data to Other ApplicationsFile Writesufodiff SubcommandsSubcommand ListIssuesLicenseInstallInstallation withpipis recommended:$ pip install ufodiffUpgrade a previous installation with:$ pip install --upgrade ufodiffQuickstart ExamplesList UFO source file additions, deletions, and modificationsPlain TextFor the last two commits:$ ufodiff delta all commits:2For the last five commits:$ ufodiff delta all commits:5For the last five commits, only from the Test-Regular.ufo source directory (note: not a filepath to source, only include UFO directory name):$ ufodiff delta all commits:5 Test-Regular.ufoBetween the current branch and thedevelopmentbranch# ufodiff delta all branch:developmentMarkdownFor the last two commits in current branch:$ ufodiff deltamd all commits:2For the last five commits in current branch:$ ufodiff deltamd all commits:5For the last five commits in current branch, only from the Test-Regular.ufo source directory (note: not a filepath to source, only include UFO directory name):$ ufodiff deltamd all commits:5 Test-Regular.ufoBetween the current branch and thedevelopmentbranch# ufodiff deltamd all branch:developmentJSONFor the last two commits in current branch:$ ufodiff deltajson all commits:2For the last five commits in current branch:$ ufodiff deltajson all commits:5For the last five commits in current branch, only from the Test-Regular.ufo source directory (note: not a filepath to source, only include UFO directory name):$ ufodiff deltajson all commits:5 Test-Regular.ufoBetween the current branch and thedevelopmentbranch# ufodiff deltajson all branch:developmentText diff UFO source filesColored text diffFor terminals with ANSI color code supportAll modified UFO files, last two commits:$ ufodiff diff commits:2All modified UFO files, last five commits:$ ufodiff diff commits:5All modified files, current branch vs. development branch:$ ufodiff diff branch:developmentUncolored text diffAll modified UFO files, last two commits:$ ufodiff diffnc commits:2All modified UFO files, last five commits:$ ufodiff diffnc commits:5All modified files, current branch vs. development branch:$ ufodiff diffnc branch:developmentUsageufodiffis a command line executable. Application features are accessed via subcommands to theufodiffexecutable.Executeufodiffinside the git repository where you develop your typeface. It will recursively test for the repository root from up to 4 levels of repository directory depth. If you are receiving exceptions due to inability to instantiate your git repository object, try bumping your working directory
up a few levels closer to the root. There are otherwise no restrictions to whereufodiffis executed inside the repository. The source directory does not need to be the current working directory.View Results in TerminalBy default, data are displayed in your terminal. Use one of the following approaches to either pipe data to another application or write data to a file.Piping Data to Other ApplicationsOn Unix/Linux/OS X platforms, use the|idiom to pipe the standard output stream fromufodiffto another application for further processing like this:$ ufodiff deltajson all commits:3 | anotherapp --dosomething-with-jsonFile WritesOn Unix/Linux/OS X platforms, use the>idiom to write the data in the standard output stream to a filepath like this:$ ufodiff delta all commits:1 > myfont_delta.txtufodiff SubcommandsSubcommand ListdeltadeltajsondeltamddiffdiffncThe commit history for all commands is compared with theHEAD~Ngit idiom. The branch comparisons across all commands are performed with thetest_branch..current_branchgit idiom.deltaufo deltagenerates file modification, addition, and deletion reports over a user specified number of commits or across git branches. The data are streamed in plain text format through standard output with indicators for the type of file change.The file change indicators include:[A]file added[D]file deleted[M]file modifiedFor Markdown formatted data, see thedeltamdcommand. For JSON formatted data, see thedeltajsonsubcommand.The syntax is:ufodiff delta [all] [commits:[N] | branch:[name]] <optional UFO filter>whereNis an integer value that represents the number of commits in the git commit history to examine andnameis the name of an existing git branch in the repository. These are mutually exclusive arguments.Examples:$ ufodiff delta all commits:3
$ ufodiff delta all commits:5
$ ufodiff delta all commits:3 Test-Regular.ufo
$ ufodiff delta all branch:development
$ ufodiff delta all branch:development Test-Regular.ufoIncrease or decrease the integer value after thecommits:argument to change the depth of the git commit history that you want to examine. Include an existing git branch name following thebranch:argument to perform a branch vs. branch comparison.Add one or more optional UFO source base directory names (e.g. Font-Regular.ufo) as last positional arguments in your command to filter the delta analysis by individual source directories.deltajsonufo deltajsongenerates file modification, addition, and deletion reports over a user specified number of commits or across git branches. The data are streamed in JSON format through standard output.For plain text formatted data, see thedeltasubcommand. For Markdown formatted data, see thedeltamdcommand.The syntax is:ufodiff deltajson [all] [commits:[N] | branch:[name]] <optional UFO filter>whereNis an integer value that represents the number of commits in the git commit history to examine andnameis the name of an existing git branch in the repository. These are mutually exclusive arguments.Examples:$ ufodiff deltajson all commits:3
$ ufodiff deltajson all commits:5
$ ufodiff deltajson all commits:3 Test-Regular.ufo
$ ufodiff deltajson all branch:development
$ ufodiff deltajson all branch:development Test-Regular.ufoJSON data for commit history analyses are formatted as:{"commits":["25087a1ab","27fdb2e48","6edab459e"],"added":["filepath 1","filepath 2","filepath 3"],"deleted":["filepath 1","filepath 2","filepath 3"],"modified":["filepath 1","filepath 2","filepath 3"]}JSON data for branch vs. branch analyses are formatted as:{"branches":["branch 1","branch 2"],"added":["filepath 1","filepath 2","filepath 3"],"deleted":["filepath 1","filepath 2","filepath 3"],"modified":["filepath 1","filepath 2","filepath 3"]}Increase or decrease the integer value after thecommits:argument to change the depth of the git commit history that you want to examine. Include an existing git branch name following thebranch:argument to perform a branch vs. branch comparison.Add one or more optional UFO source base directory name (e.g. Font-Regular.ufo) as last positional arguments in your command to filter the delta analysis by individual source directories.deltamdufodiff deltamdgenerates file modification, addition, and deletion reports over a user specified number of commits or across git branches. The data are streamed in Github flavored Markdown format through standard output.For plain text formatted data, see thedeltacommand. For JSON formatted data, see thedeltajsoncommand.The syntax is:ufodiff deltamd [all] [commits:[N] | branch:[name]] <optional UFO filter>whereNis an integer value that represents the number of commits in the git commit history to examine andnameis an existing git branch name for a branch vs. branch comparison.Examples:$ ufodiff deltamd all commits:3
$ ufodiff deltamd all commits:5
$ ufodiff deltamd all commits:3 Test-Regular.ufoIncrease or decrease the integer value after thecommits:argument to change the depth of the git commit history that you want to examine. Include an existing git branch name following thebranch:argument to perform a branch vs. branch comparison.Add one or more optional UFO source base directory name (e.g. Font-Regular.ufo) as last positional arguments in your command to filter the delta analysis by individual source directories.diffufodiff diffprovides colored text diffs for all UFO files that were modified across one or more commits in the working branch, or between the HEAD of the working branch and any other branch in the repository.For uncolored diffs, see thediffnccommand.The command syntax is:ufodiff diff [commits:[N] | branch:[name]]whereNis an integer value that represents the number of commits in the git commit history to examine andnameis the name of an existing git branch in the repository. These are mutually exclusive arguments.Examples:$ ufodiff diff commits:2
$ ufodiff diff branch:masterdiffncufodiff diffncprovides uncolored text diffs for all UFO files that were modified across one or more commits in the working branch, or between the HEAD of the working branch and any other branch in the repository.For colored diffs intended for use in terminals that support ANSI color codes, see thediffcommand.The command syntax is:ufodiff diffnc [commits:[N] | branch:[name]]whereNis an integer value that represents the number of commits in the git commit history to examine andnameis the name of an existing git branch in the repository. These are mutually exclusive arguments.Examples:$ ufodiff diffnc commits:2
$ ufodiff diffnc branch:masterIssuesPlease submit bug reports and feature requests as anissue reporton our Github repository.LicenseMIT License