tonytraductor (tonytraductor) wrote in lj_dev,
tonytraductor
tonytraductor
lj_dev

Success...partially...

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...
Tags: client, client: posting, client: tcl/tk
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments