aboutsummaryrefslogtreecommitdiff
path: root/rcc_format/__init__.py
blob: af32432f7e986e4069c24e028c9b9c92f6483801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from rcc_format.util import *
from os.path import basename

def dump(args):
    write_header(args.output, args.namespace)

    items = []
    for f in args.input:
        x = resource(basename(f.name), to_variable_name(f.name), f.name)
        items.append(x)
        write_item(args.output, x.variable, f.read())
    
    write_entries(args.output, items)
    write_footer(args.output, args.namespace)