Skip to content

Instantly share code, notes, and snippets.

@thomasfl
Created February 24, 2012 10:08
Show Gist options
  • Select an option

  • Save thomasfl/1899912 to your computer and use it in GitHub Desktop.

Select an option

Save thomasfl/1899912 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'open-uri-and-write'
file = open("https://www-dav.usit.uio.no/takk_for_meg.html","w")
file.puts { "resourcetype" => "structured-article",
"properties" => { "title" => "Takk for meg!",
"introduction" => "Det har vært 10 fine år."
"content" => "Hilsen Thomas Flemming",
}.to_json
file.proppatch('<v:publish-date xmlns:v="vrtx">' + Time.now.httpdate.to_s + '</v:publish-date>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment