Skip to content

Commit

Permalink
Now backdating entries actually works.
Browse files Browse the repository at this point in the history
Also, without the stupid that LiveJournal insists on.
  • Loading branch information
dagbrown authored and Dave Brown committed May 27, 2008
1 parent da19af4 commit 56d6c87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 2 additions & 8 deletions bin/ljsend
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,14 @@ Dir.open("#{outgoingdir}") do |d|
"Music" => :current_music,
"Userpic" => :picture,
"Security" => :security,
"Preformatted" => :preformatted
"Preformatted" => :preformatted,
"Backdate" => :backdated
}.each do |header, option|
if posting[header] != "" then
opts[option] = posting[header]
end
end

if opts.has_key? "Backdate" then
if opts["Backdate"] then
opts["opt_backdated"] = true
end
opts.delete "Backdate"
end

if posting["Date"] != "" then
unless posting["Date"].respond_to? :strftime
posting["Date"] = DateTime.parse(posting["Date"])
Expand Down
3 changes: 2 additions & 1 deletion lib/livejournaller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def post subject, text, options = {}
:preformatted => :opt_preformatted,
:nocomments => :opt_nocomments,
:picture => :picture_keyword,
:noemail => :opt_noemail
:noemail => :opt_noemail,
:backdated => :opt_backdated
}.each do |option_name, lj_option_name|
if options[option_name] then
callhash[:props][lj_option_name] = options[option_name]
Expand Down

0 comments on commit 56d6c87

Please sign in to comment.