Source

hgfilemerge / README.rst

HgFileMerge

Utility to merge multiple files into one.

Usage for config:

$ cat tests/testfiles/conf.yml
base_path: tests/testfiles/test_yml_config_parser/
merge_groups:
    - name: merged_most_popular.css
      files:
      - 1.css
      - 2.css
    - name: merged_site.css
      files:
      - 3.css

is:

>>> from hgfilemerge import HgFileMerge
>>> m = HgFileMerge()
>>> m.configure_from_file('./hgfilemerge/tests/testfiles/conf.yml')
>>> m.save()

This will save file base_path/merged_most_popular.css that is merge of 1.css and 2.css, and file merged_site.css that is basically a 3.css. Simple stupid :-)