Exemple #1
0
from pybase import Basecamp

basecamp_url = raw_input('BaseCamp URL.')
username = raw_input('BaseCamp UserName:'******'BaseCamp PassWord:')

conn = Basecamp(basecamp_url,username,password)

for project in conn.get_projects():
    print project.name, project.id
Exemple #2
0
import mx.DateTime
import sys
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
Exemple #3
0
if start_date > end_date:
    print "Error, start date is after end date."
    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
Exemple #4
0
    return keys


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))


basecamp_url = raw_input('BaseCamp URL.')
username = raw_input('BaseCamp UserName:'******'BaseCamp PassWord:'******'Start')
print "Start date is",start_date

end_date = get_date('End Date')