ljUserName = "put your lj name here" ljPassword = "put your lj password here" tempFileName = "MyPlan" fingerHost = "put the ip or hostname of the ftp site where you want to put your plan" fingerUserName = "put the account name of the ftp account on the finger site" fingerPassword = "put the password of the ftp account on the finger site" fingerFile = ".plan"
server = xmlrpclib.ServerProxy(uri="http://www.livejournal.com/interface/xmlrpc",verbose=False) result = {} plan = ""
result = server.LJ.XMLRPC.getevents({"username": ljUserName,"password": ljPassword,"selecttype":"one","itemid":"-1"}) plan = string.join( [ result['events'][0]['eventtime'], result['events'][0]['subject'], "", result['events'][0]['event']], "\n")
no subject
Date: 2004-01-15 07:01 am (UTC)---
import xmlrpclib,string,ftplib,os
ljUserName = "put your lj name here"
ljPassword = "put your lj password here"
tempFileName = "MyPlan"
fingerHost = "put the ip or hostname of the ftp site where you want to put your plan"
fingerUserName = "put the account name of the ftp account on the finger site"
fingerPassword = "put the password of the ftp account on the finger site"
fingerFile = ".plan"
server = xmlrpclib.ServerProxy(uri="http://www.livejournal.com/interface/xmlrpc",verbose=False)
result = {}
plan = ""
result = server.LJ.XMLRPC.getevents({"username": ljUserName,"password": ljPassword,"selecttype":"one","itemid":"-1"})
plan = string.join(
[ result['events'][0]['eventtime'],
result['events'][0]['subject'],
"",
result['events'][0]['event']],
"\n")
temp = file(tempFileName,"w+a")
temp.write(plan)
temp.close()
storeCommand = "STOR " + fingerFile
temp = file(tempFileName)
ftpClient = ftplib.FTP(fingerHost, fingerUserName, fingerPassword)
ftpClient.storlines(storeCommand,temp)
ftpClient.quit()
temp.close()
os.remove(tempFileName)
---
Simple no?