# Path: sheetsite/names.py
# def normalize_name(name):
#     name = name.lower()
#     return NAMES.get(name, name)
# 
# Path: sheetsite/filtered_spreadsheet.py
# class FilteredSpreadsheet(object):
#     def __init__(self, workbook, selector, processor):
#         self.workbook = workbook
#         titles = [(sheet, selector(sheet))
#                   for sheet in self.workbook.worksheets()]
#         self.sheets = [FilteredSheet(sheet, title, processor)
#                        for sheet, title in titles
#                        if title is not None]
# 
#     def worksheets(self):
#         return self.sheets
# 
# Path: sheetsite/merged_spreadsheet.py
# class MergedSpreadsheet(object):
#     def __init__(self, workbook, merge_tables):
#         self.workbook = workbook
#         merged = set()
#         for key, lst in merge_tables.items():
#             merged = merged | set(lst)
#         original_sheets = self.workbook.worksheets()
#         sheet_by_name = {}
#         for sheet in original_sheets:
#             sheet_by_name[sheet.title] = sheet
#         sheets = [sheet for sheet in original_sheets if sheet.title not in merged and '*' not in merged]
#         for key, lst in merge_tables.items():
#             if lst[0] == '*':
#                 sheets.append(MergedSheet(key, original_sheets))
#             else:
#                 sheets.append(MergedSheet(key, [sheet_by_name[name] for name in lst]))
#         self.sheets = sheets
# 
#     def worksheets(self):
#         return self.sheets


import os
import re
        import re
from sheetsite.names import normalize_name
from sheetsite.filtered_spreadsheet import FilteredSpreadsheet
from sheetsite.merged_spreadsheet import MergedSpreadsheet
        from sheetsite.destination import write_destination
        from sheetsite.geocache import GeoCache
                            result.append(None)
            if name in self.constant_columns:
                for col, val in self.constant_columns[name].items():
                    if col not in existing:
                        if ridx == 0:
                            result.append(col)
                        else:
                            result.append(val)
            results.append(result)

        return results

    def add_location(self, vals, name):
        if len(vals) == 0:
            return vals

        have_address = False
        have_fill_in = False
        pattern = [0]
        fill_in = []
        group_index = None
        offset = 0
        for idx, cell in enumerate(vals[0]):
            if name in self.rename_columns:
                renames = self.rename_columns[name]
                if cell in renames:
                    cell = renames[cell]
                    vals[0][idx] = cell
            if cell == self.group_key and self.group_key is not None:
                group_index = idx

# Path: sheetsite/names.py
# def normalize_name(name):
#     name = name.lower()
#     return NAMES.get(name, name)
# 
# Path: sheetsite/filtered_spreadsheet.py
# class FilteredSpreadsheet(object):
#     def __init__(self, workbook, selector, processor):
#         self.workbook = workbook
#         titles = [(sheet, selector(sheet))
#                   for sheet in self.workbook.worksheets()]
#         self.sheets = [FilteredSheet(sheet, title, processor)
#                        for sheet, title in titles
#                        if title is not None]
# 
#     def worksheets(self):
#         return self.sheets
# 
# Path: sheetsite/merged_spreadsheet.py
# class MergedSpreadsheet(object):
#     def __init__(self, workbook, merge_tables):
#         self.workbook = workbook
#         merged = set()
#         for key, lst in merge_tables.items():
#             merged = merged | set(lst)
#         original_sheets = self.workbook.worksheets()
#         sheet_by_name = {}
#         for sheet in original_sheets:
#             sheet_by_name[sheet.title] = sheet
#         sheets = [sheet for sheet in original_sheets if sheet.title not in merged and '*' not in merged]
#         for key, lst in merge_tables.items():
#             if lst[0] == '*':
#                 sheets.append(MergedSheet(key, original_sheets))
#             else:
#                 sheets.append(MergedSheet(key, [sheet_by_name[name] for name in lst]))
#         self.sheets = sheets
# 
#     def worksheets(self):
#         return self.sheets


# Path: sheetsite/site.py
import os
import re
        import re
from sheetsite.names import normalize_name
from sheetsite.filtered_spreadsheet import FilteredSpreadsheet
from sheetsite.merged_spreadsheet import MergedSpreadsheet
        from sheetsite.destination import write_destination
        from sheetsite.geocache import GeoCache

                            result.append(None)
            if name in self.constant_columns:
                for col, val in self.constant_columns[name].items():
                    if col not in existing:
                        if ridx == 0:
                            result.append(col)
                        else:
                            result.append(val)
            results.append(result)

        return results

    def add_location(self, vals, name):
        if len(vals) == 0:
            return vals

        have_address = False
        have_fill_in = False
        pattern = [0]
        fill_in = []
        group_index = None
        offset = 0
        for idx, cell in enumerate(vals[0]):
            if name in self.rename_columns:
                renames = self.rename_columns[name]
                if cell in renames:
                    cell = renames[cell]
                    vals[0][idx] = cell
            if cell == self.group_key and self.group_key is not None:
                group_index = idx

            nn = normalize_name(cell)