Skip to content

Instantly share code, notes, and snippets.

@thomasfl
Created January 5, 2010 15:49
Show Gist options
  • Save thomasfl/269461 to your computer and use it in GitHub Desktop.
Save thomasfl/269461 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'vortex_client'
vortex = Vortex::Connection.new("https://vortex-dav.uio.no/")
print "Title: "
title = gets
print "Introduction: "
introduction = gets
print "Body: "
body = gets
print "Author: "
author = gets
vortex.cd('/brukere/thomasfl/nyheter/')
article = Vortex::HtmlArticle.new(:title => title,
:introduction => introduction,
:body => "<p>" + body + "</p>",
:publishedDate => Time.now,
:author => author)
url = vortex.publish(article)
puts "Published to: " + url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment