#!/usr/bin/perl -w

BEGIN
  {
  use lib '../lib';			# if run with module not yet installed
  chdir 'examples' if -d 'examples';	# wrong dir?
  $|++;					# buffer off
  }

use Convert::Wiki;

my $cvt = Convert::Wiki->new();		# create conversion object

local $/ = undef;			# slurp mode
$cvt->from_txt( <> );			# read in input from stdin
print $cvt->as_wiki();			# output converted text

print STDERR "txt2wiki error: " . $cvt->error() if $cvt->error();
