 fs      = require "fs"
 mkdirp  = require "mkdirp"
 
-majors =
-  all: 
+majors = [
+  {
+    name: "all"
     values: ["all"]
-  year: 
+  }
+  {
+    name: "year"
     sql: "YEAR(t.matchdate) = ?"
     values: [2004,2007,2008,2009,2010,2011,2012]
-  player: 
+  }
+  {
+    name: "player"
     sql: "GET_PLAYER_NAME(p.playerid,'','') = '?'"
-    values: ["Dan", "Tom", "JD", "Jeran", "Guest", "Spirk"]    
-  location: 
+    values: ["Dan", "Tom", "JD", "Jeran", "Guest", "Spirk"]
+  }
+  {
+    name: "location"
     sql: "GET_LOCATION_NAME(t.location, 'ADDY') = '?'"
     values: [
       "1217 (Pomona, CA)"

    else
      delete sql.major
    
    for minor_name, minor of minors
      
      for minor_value in minor.values
        
        for script in scripts
          script_filename = "#{__dirname}/individual/#{script}"

      "207E (Encino, CA)"
      "14211 (Sherman Oaks, CA)"
    ]
  }
]


minors = [
  {
    name: "all"
    values: ["all"]
  }
  # {
  #   name: "month"
  #   values: ["January", "February", "March", "April", "May", "June"]
  # }
  # {
  #   name: "dom"
  #   values: []
  # }
  # {
  #   name: "dow"
  #   sql: "DAYNAME(t.matchdate) = '?'"
  #   values: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
  # }
]

# dom = 1
# while dom <= 31
