ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/NinoSystemsInfo.py
Revision: 8
Committed: Sat May 5 04:21:19 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/x-python
File size: 1705 byte(s)
Log Message:
Initial Import

File Contents

# User Rev Content
1 ninoborges 8 ## NinoSystemsInfo
2     ## A small program that will return an html file with all the comment info and stat info on my site.
3     ## 07.17.03
4     ## EBorges
5    
6     from URL_Grab import GrabUrl
7     import os
8    
9     #A static list of all alumbs untill I figure out how to get this info from Zope
10     albumbList = ['ApplePicking02','Azores02','Azores04','Bot-Gardens03','BushGardens02','ChristianBaptism02','Christmas02','Easter03',
11     'Friends','IsaiahHockey04','Holloween02','MeuQuintal','Philly03','RITripJuly03','RITripMay02','SnowShoe03','StellaCab','Us02','Us03',
12     'WashingtonDC03','Zoo03','ArgonneDr','Birthday03','Christmas03','Thanksgiving03','Blizzard05']
13     mainURL = "http://67.62.78.18:8080/NinoSystems/Personal/PhotoAlbums/mainPhotoAlbum/"
14    
15     operation = 0
16    
17     while operation == 0:
18     operation = raw_input('What would you like to do?\n1. Get all comments\n2. Get all Stats\n(1/2) >> ')
19    
20     if operation == '1':
21     print "Retriving all comments"
22     command = "manage_comment"
23     else:
24     print "Retriving all stats"
25     command = "stat_zphoto"
26    
27     # Create new HTML file.
28     o = open('C:\\temp\NinoSystemsInfo.html','w')
29     o.write('<HTML>\n<HEAD>\n<title>Your results.</title>\n<link rel="stylesheet" href="http://64.83.11.5:8080/NinoSystems/Personal/PhotoAlbums/mainPhotoAlbum/BushGardens02/css/stylesheet_base_css" type="text/css" />\n</HEAD>\n<body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B"')
30     for folder in albumbList:
31     print "connecting to %s"% folder
32     siteUrl = mainURL + folder+ '/' + command
33     contents = GrabUrl(siteUrl,'<body','</body>')
34     o.write(contents)
35     o.write('</body>\n</HTML>')
36     o.close()
37     os.startfile('C:\\temp\NinoSystemsInfo.html')