2018-12-01 14:24:43 -05:00
|
|
|
import yaml
|
2018-12-06 01:29:53 -05:00
|
|
|
from lib.package import Category, Package
|
2018-12-01 14:24:43 -05:00
|
|
|
|
|
|
|
def parse(file):
|
|
|
|
f = open(file, 'r')
|
|
|
|
data = yaml.load(f)
|
|
|
|
return [Category(name, packages) for name, packages in data.items()]
|