示例#1
0
def main():
    """Application entry point"""
    crimeList = generate_news_list()

    for crime in crimeList:
        for idx in range(5):
            print "crime[" + str(idx) +"] : ", str(crime[idx]) #debug string to display progress
        print "----------------------------------------------------------"
    
    header = html.getHeader()
    
    gmap = CrimeGMaps(crimeList)
    
    option = gmap.optionStr()
        
    latlng = gmap.latLngStr()   #get latitude and longitude
    
    places = gmap.placeStr()

    infoWindow = gmap.infoWindowStr()
    
    body = option + latlng + places + infoWindow
    
    footer = html.getFooter()
    
    html.makeHTML(header, body, footer)

    print "NSW crime news page updated"
示例#2
0
def main():
    crimeList = generate_news_list()
    for crime in crimeList:
        for idx in range(5):
            print "crime[" + str(idx) +"] : ", str(crime[idx])
        print "----------------------------------------------------------"
    
    header = html.getHeader()
    gmap = CrimeGMaps(crimeList)
    option = gmap.optionStr()
    latlng = gmap.latLngStr()
    places = gmap.placeStr()
    infoWindow = gmap.infoWindowStr()
    body = option + latlng + places + infoWindow
    footer = html.getFooter()
    
    html.makeHTML(header, body, footer)
    print "NSW crime news page updated"