#!/usr/bin/perl -w
# This code is a part of Slash, and is released under the GPL.
# Copyright 1997-2001 by Open Source Development Network. See README
# and COPYING for more information, or see http://slashcode.com/.
# $Id: convert-dump,v 1.2 2001/03/20 20:39:25 brian Exp $

# Quick script to convert the mysql data to postgresql.
# -Brian

open (FILE, $ARGV[0]) or die "Can not open original\n";

while(<FILE>) {
	next if /^#/;
	next if /^ /;
	next if /^INSERT INTO users/;
	print $_;
}
print qq|INSERT INTO users (uid,nickname,realname,passwd,matchname) VALUES (1,'Anonymous Coward','Anonymous Coward','eb399bcaca686f8609137153307eecf1','anonymouscoward');|;

print qq| INSERT INTO users_param (uid, name, value) VALUES (1,points,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,posttype,'html'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maxcommentsize,'4096'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,hardthresh,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,clbig,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,clsmall,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,reparent,'1'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,nosigs,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentlimit,'100'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentspill,'50'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentsort,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noscores,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,mode,'thread'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,threshold,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,extid,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exaid,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exsect,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exboxes,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maxstories,'30'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noboxes,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,totalmods,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,bio,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,tokens,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maillist,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,totalcomments,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,lastmmid,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,session_login,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,willing,'1'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,dfid,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,tzcode,'edt'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noicons,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,light,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,mylinks,''); |;
