#!/usr/bin/python


import argparse
import json
import config
import requests
import datetime
import csv
import sys
import re
import time
from datetime import timedelta
import dateutil.parser
import pytz

from slacker import Slacker
slack = Slacker(config.token)


OPENBMC_REPO_ID = '42542702'
ZENHUB_API = 'https://api.zenhub.io/p1/repositories/%s/' % OPENBMC_REPO_ID
ZENHUB_API_ISSUES = ZENHUB_API + 'issues/'
ZENHUB_API_EPICS = ZENHUB_API + 'epics/'
GITHUB_AUTH = (config.GITHUB_USER, config.GITHUB_PASSWORD)
REPO_ID = '42542702'
GITHUB_API_ISSUES = 'https://api.github.com/repos/openbmc/openbmc/issues/'

option_csv = None
option_pipe = None
current_date = (datetime.datetime.now()).date()

day_late = (
        dateutil.parser.parse(
            str(current_date + timedelta(days=-1)))).replace(tzinfo=pytz.UTC)
two_day_late = (
        dateutil.parser.parse(
            str(current_date + timedelta(days=-2)))).replace(tzinfo=pytz.UTC)
really_late = (
        dateutil.parser.parse(
            str(current_date + timedelta(days=-3)))).replace(tzinfo=pytz.UTC)

if current_date.weekday() == 0:
    day_late = (