?

Log in

No account? Create an account
September 14th, 2008 - LiveJournal Development — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

September 14th, 2008

Success...partially... [Sep. 14th, 2008|10:22 am]
LiveJournal Development

lj_dev

[tonytraductor]
[Tags|, , ]

I apologize for flooding the queu.
Please disregard my prior posts.

At this juncture, I have succeeded in posting to my LJ using Tickle Text
by using this proc:

################
# post to livejournal...

proc ljpost {} {

global post
global plength
global login
global lurl
global subject
global mood
global tunes
global tags
global year
global mon
global day
global hour
global min
global mood
global tunes
global ptext
global lprops

set subject "subject"
set mood "mood"
set tags "enter, tags, here"
set tunes "music"
set lurl "http://www.livejournal.com/interface/flat:80"

set year [clock format [clock second] -format %Y]
set mon [clock format [clock seconds] -format %m]
set day [clock format [clock seconds] -format %d]
set hour [clock format [clock seconds] -format %H]
set min [clock format [clock seconds] -format %M]



toplevel .lj
wm title .lj "LiveJournal Post"

grid [tk::label .lj.ljname -text "LJ Username:"]\
[tk::entry .lj.uname -textvariable ljname]\
[tk::label .lj.pwd -text "LJ Password:"]\
[tk::entry .lj.pswd -show * -textvariable ljpswrd]

grid [tk::label .lj.date -text "Post time="]\
[tk::label .lj.dato -text "$year $mon $day - $hour : $min"]

grid [tk::label .lj.sujet -text "Subject:"]\
[tk::entry .lj.assunto -textvariable subject]

grid [tk::label .lj.md -text "Current mood:"]\
[tk::entry .lj.mude -textvariable mood]

grid [tk::label .lj.tunages -text "Current music:"]\
[tk::entry .lj.tunez -textvariable tunes]

grid [tk::label .lj.tagz -text "Tags:"]\
[tk::entry .lj.tagit -textvariable tags]

set ptext [.txt.txt get 1.0 {end -1c}]


set login [::http::formatQuery mode login user $::ljname password $::ljpswrd ]
set log [http::geturl $lurl -query $login]




grid [tk::button .lj.go -text "POST" -command {

set post [::http::formatQuery mode postevent auth_method clear user $::ljname password $::ljpswrd subject $::subject year $::year mon $::mon day $::day hour $::hour min $::min event current_mood $::mood current_music $::tunes taglist $::tags $::ptext ]
set plength [string length $::post]
set dopost [http::geturl $::lurl -query $::post]
set ljmta [http::meta $dopost]
set ljl [http::size $dopost]
set ljstat [http::status $dopost]
tk_messageBox -message "$ljmta\nLJ says: $ljstat\nPost length: $ljl"
}]\
[tk::button .lj.bro -text "VIEW Journal" -command {
set ljv "http://$::ljname.livejournal.com"
exec $::brow $ljv &
}]\
[tk::button .lj.ajuda -text "LJ Help" -command {ljhelp}]\
[tk::button .lj.no -text "DONE" -command {destroy .lj}]

}

####
# end proc ljpost



But, I'm not succeeding in setting the tags, music, and mood.
I don't understand what I'm doing wrong here...
link6 comments|post comment

Invalid character [Sep. 14th, 2008|10:55 pm]
LiveJournal Development

lj_dev

[mcfnord]
[Tags|, ]

I'm boppin along on foaf xml using .NET Framework 3.5 and after parsing 2k of foafs clean-n-easy I hit this one:

XDocument.Load("http://www.livejournal.com/users/andrewus/data/foaf");

System.Xml.XmlException: Invalid character in the given encoding. Line 39, position 331.

I think it's due to Russian characters in the or something. It's a bummer and I'm skipping it for now but I'm hoping someone's got a tip.
link5 comments|post comment

navigation
[ viewing | September 14th, 2008 ]
[ go | Previous Day|Next Day ]