Yamlstrings
Small utility to convert YAML files to Objective-C (used by NSBundle) strings files.
The following YAML file:
foo:
bar: Hello World
bar2: Hello World 2
is converted to:
"foo.bar" = "Hello World";
"foo.bar2" = "Hello World 2";
Yamlstrings let you merge multiple input YAML files into one strings file using prefix.
Use a special key _prefix
to have this prefix prepended to all keys. For example:
_prefix: important
foo:
bar: Hello World
bar2: Hello World 2
is converted to:
"important.foo.bar" = "Hello World";
"important.foo.bar2" = "Hello World 2";
Installation
Install it:
$ gem install yamlstrings
Usage
CLI:
$ yamlstrings input1.yaml input2.yaml output.strings
API:
converter = Yamlstrings::Converter.new(inputs)
converter.to_file(output)
Known issues
- Write specs
- Write doc
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request