Skip to content

Commit

Permalink
updated script added files
Browse files Browse the repository at this point in the history
  • Loading branch information
srobb1 committed Oct 19, 2019
1 parent c1081b4 commit e57e1a5
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
47 changes: 47 additions & 0 deletions files/shirts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
mens small heather seafoam
womens medium Heather Purple
womens medium berry
mens medium heather coral silk
womens Small Kiwi
mens large Graphite Heather
mens large sport grey
mens small Carolina Blue
mens large heather purple
mens large heather coral silk
mens Medium Heather Royal
mens large Heather Irish
womens Medium heather purple
mens xs white
mens Medium heather royal
womens Small Berry
mens medium Heather Galapagos Blue
womens Medium Royal heather
womens Small Antique Heliconia
womens large kiwi
womens Small Antique Heliconia
mens xl Heather cardinal
womens xs Heather orange
mens small Cornsilk
mens medium Heather Forest
mens small dark heather
mens small Heather Maroon
mens small Royal Blue
womens medium kiwi
mens medium gold
mens large Heather Royal
mens xl indigo blue
womens medium berry
mens medium Heather Military Green
mens medium dark heather
mens medium Carolina Blue
mens large Carolina Blue
womens medium Carolina Blue
Mens Medium Iris
child 4T green
child 3T pink
child 2T orange
child 6T pink
child 4T green
Womens Medium Kiwi
Womens Medium heather purple
mens small olive
36 changes: 36 additions & 0 deletions scripts/shirts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python3


"""
mens large heather purple
mens small heather seafoam
womens medium Heather Purple
womens medium berry
mens medium heather coral silk
womens Small Kiwi
mens large Graphite Heather
mens large sport grey
"""

shirts = {}
with open("shirts.txt","r") as file_object:
for line in file_object:
line = line.rstrip()
[style, size, color] = line.split("\t")
style = style.lower()
size = size.lower()
color = color.lower()
if style not in shirts:
shirts[style] = {}
if size not in shirts[style]:
shirts[style][size] = {}
if color not in shirts[style][size]:
shirts[style][size][color] = 0

shirts[style][size][color] += 1

for style in shirts:
for size in shirts[style]:
for color in shirts[style][size]:
count = shirts[style][size][color]
print(style,size,color,count)
12 changes: 12 additions & 0 deletions setup/tshirts/shirts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/usr/bin/env python3


"""
mens large heather purple
mens small heather seafoam
womens medium Heather Purple
womens medium berry
mens medium heather coral silk
womens Small Kiwi
mens large Graphite Heather
mens large sport grey
"""

shirts = {}
with open("shirts.txt","r") as file_object:
for line in file_object:
Expand Down

0 comments on commit e57e1a5

Please sign in to comment.