function! HatenaPost(base_url,user,cookie_file,diary,body_file)
if a:body_file == ""
let body_file=tempname()
execute 'new '.body_file
call append(0,a:diary['body'])
write
let &modified=0
bdelete
else
let body_file=a:body_file
endif
let post_data = ' -F mode=enter'
\ . ' -F year=' . a:diary.year
. ' -F month=' . a:diary.month . ' -F day=' . a:diary.day
\ . ' -F rkm=' . a:diary.rkm
\ . ' -F body= -F title='
"/Users/basyura/.vim/plugin/hatena/cookies/basyura"
call system(s:curl_cmd . ' ' . a:base_url . a:user
. '/edit -b "' . a:cookie_file . '"' . post_data)
"body=</var/folders/9A/9ACf0++TI/-Tmp-/v854248/3"
let post_data = ' -F mode=enter'
\ . ' -F timestamp=' . a:diary['timestamp']
. ' -F rkm=' . a:diary['rkm']
\ . ' -F year=' . a:diary['year']
. ' -F month=' . a:diary['month']
. ' -F day=' . a:diary['day']
\ . ' -F date=' . a:diary['year'].a:diary['month'].a:diary['day']
\ . ' -F "body=<' . body_file . '"'
\ . ' -F image= -F title=' . a:diary['day_title']
"/Users/basyura/.vim/plugin/hatena/cookies/basyura"
"body=</var/folders/9A/9ACf0++TI/-Tmp-/v854248/3"
return system(s:curl_cmd . ' ' . a:base_url . a:user . '/edit -b "'
. a:cookie_file . '"' . post_data . ' -D -')
endfunction