Project

differz

0.01
No commit activity in last 3 years
No release in over 3 years
Compare two yaml-files and show the missing keys.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

= 2.8.1
 Project Readme

This is a simple but sometimes very useful tool. If you pass 2 yaml files it will compare them and show the keys of the first file that the second file is missing.

That can be handy if you develop a multilingual application and your translations are stored in yaml files. An example is a Rails framework with yaml files for every language (em.yml, ru.yml...). Many other apps use this approach too.

Usage

You can use it from the command line:

differz --help

GLOBAL OPTIONS

--help - Show all the arguments and commands

--version - Display the program version

COMMANDS

edit - Allows you to fill missing keys in yaml file

help - Shows a list of commands or help for one command

show - Only show the difference between yaml-files without editing them

For the show and edit commands you have to pass at least two arguments: paths for yaml files that should be compared. Here is an example of usage:

differz show file1.yml file2.yml

As a result, you will see all the keys from file1.yml that are missing in file2.yml. The result will be shown in format like this:

en -> main -> label
en -> main -> text
...
level1 -> level2 -> level3...