Esempio n. 1
0
    sys.exit(0)

# program starting
print "ProcessDate:", process_date
print "Invoice Period:"
print "Start:", start_date
print "End:", end_date


# connect to basecamp
print "Connecting to Basecamp"
print ""

conn = Basecamp(bc_url, bc_user, bc_pwd)

people = conn.people_id_map(our_company)

print "ID:Name"
for id in people:
    print "%d:%s" % (id, people[id])
print ""

projects = conn.project_id_map()

print "ID:Project"
for id in projects:
    print "%d:%s" % (id, projects[id])

# get all of the time entries
# a hash {project id:[time entires]}
time_entries = dict([(id, []) for id in projects])
Esempio n. 2
0
from pybase import Basecamp
from config import *
from helper import *



def get_date(name=''):

    date_str = raw_input('Enter %s Date (YYYY-MM-DD) ' % name)
    year, month, day = date_str.split('-')
    return datetime.date(int(year),int(month),int(day))


conn = Basecamp(bc_url,bc_user,bc_pwd)

our_people = conn.people_id_map()
our_projects = conn.project_id_map()

#for project in conn.get_projects():
#    print project.id

all_entries = []

today = mx.DateTime.now()

#the previous sunday
end_date = previous_sunday(today)

#the second preceeding monday
start_date = two_weeks_ago(end_date)