Hi pluggers!
I've installed dropbox on Linux. I get responses when I type dropbox
help, dropbox status, etc. It also says it is NOT running.
When I run dropbox start, it say run "dropbox start -i" to install the
daemon. I thought this would install dropboxd in memory.
But "dropbox start -i" tells me to download the "Dropbox proprietary
daemon", and then does a huge file transfer, without telling me what is
really happening, only a horizontal bar that shows % progress (not
actual size). And since it took minutes for it to reach 1%, I thought
these were unusually huge files, for software I thought I already
installed. So I canceled the transfer.
Any advice?
For context, the solution I am working on (Danny Ching, pls tell me
if I'm on the right track), is to save the Luzon load curve jpeg that I
can now properly generate (thanks to people here who helped out!), to a
directory which will be mirrored on Dropbox, and which will then be
shared with others interested in mirroring it on their servers.
Let me know also if this is a good solution or if there's a simpler one.
Here's another problem I already solved but it's an ugly klutz. NGCP
makes available the daily power supply status of Luzon (also Visayas
and Mindanao) at the url ngcp.ph/power_status.asp.
I get an html file and buried within it is the information I want
(Luzon MW capacity for the day).
I'm looking for a more resilient and simpler way. if any, than the
Python code below. It's a klutz, I know. The slightest change could
break it. I tried Beautiful Soup but I can't seem to install it
properly due to dependency problems that couldn't be resolved.
Greetings to all,
Obet
Extracting Luzon MW capacity from the html file returned by
ngcp.ph/power_status.asp:
from HTMLParser import HTMLParser
class HeadingParser(HTMLParser):
inHeading = False
prevdata = 'xxx'
done = False
capacity = []
def handle_starttag(self, tag, attrs):
if tag == 'td' or tag=='p':
self.inHeading = True
def handle_data(self, data):
if self.inHeading:
'''
if not data.strip().isdigit(): print '\n'+
data , else: print ', '+data.strip() ,
'''
if not self.done:
self.capacity.append(data.strip()) if 'System Peak' in data: self.done
= True
def handle_endtag(self, tag):
if tag == 'td' or tag=='p':
self.inHeading = False
def daysupply_asof():
hParser = HeadingParser()
f = open('ngcp.dat')
html = f.read()
f.close()
hParser.feed(html)
when = hParser.capacity[1].replace(',',' ').replace(')',
'').split()
return ' '.join([when[7], when[5], when[6], when[3], when[2]]),
hParser.capacity[3]
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph