Permalink
Browse files

wikipost app

git-svn-id: svn://78.47.249.61/ruby-mediawiki/trunk@60 ba9c31aa-a806-0410-9a81-9f13d15ee83b
  • Loading branch information...
1 parent 5efc959 commit 764ba60969e046843db2755a69e313f2fd69de88 astro committed Apr 17, 2006
Showing with 14 additions and 0 deletions.
  1. +14 −0 apps/wikipost.rb
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+$:.unshift('../lib')
+require 'mediawiki/dotfile'
+
+if ARGV.size != 3
+ puts "Usage: #{$0} <Article name> <file> <comment>"
+ exit
+end
+
+wiki = MediaWiki.dotfile
+a = wiki.article(ARGV[0])
+a.text = File.new(ARGV[1]).readlines.to_s
+a.submit(ARGV[2])

0 comments on commit 764ba60

Please sign in to comment.