#!/usr/bin/env python3
import sys, pickle

from database import Database

def main():
    db = Database()

    with open('blockworld.txt', 'r') as infile:
        for line in infile:
            if line.strip() != '':
                db.add(line.strip())

    with open('blockworld.db', 'wb') as outfile:
        pickle.dump(db, outfile)

if __name__ == '__main__':
    main()
