19 lines
541 B
Python
19 lines
541 B
Python
import argparse
|
|
|
|
parser = argparse.ArgumentParser(description='Convert spreadsheet data into named directories')
|
|
parser.add_argument('--in', '-i', dest='file_in', required=True)
|
|
parser.add_argument('--out', '-o')
|
|
parser.add_argument('--range', '-r', dest='cell_range')
|
|
parser.add_argument('column_groups', nargs='+')
|
|
|
|
args = parser.parse_args()
|
|
|
|
from spreadsheet import get_names_list
|
|
|
|
names = get_names_list(args.file_in, args.cell_range, args.column_groups)
|
|
|
|
from directory import create_directories
|
|
|
|
create_directories(args.out, names)
|
|
|