remove ancient porting scripts
no one will ever need these, no need to have clutter
This commit is contained in:
parent
06aa567421
commit
6855fc561a
@ -1,36 +0,0 @@
|
||||
from ConfigParser import ConfigParser, NoOptionError
|
||||
import os
|
||||
import sys
|
||||
|
||||
from facts.models import FactCategory, Fact
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
config = ConfigParser()
|
||||
config.read(os.path.expanduser(config_file))
|
||||
|
||||
dbhost = config.get('dr.botzo', 'dbhost')
|
||||
dbuser = config.get('dr.botzo', 'dbuser')
|
||||
dbpass = config.get('dr.botzo', 'dbpass')
|
||||
dbname = config.get('dr.botzo', 'dbname')
|
||||
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8', use_unicode=True)
|
||||
try:
|
||||
cur = db.cursor()
|
||||
query = '''
|
||||
SELECT * FROM facts_facts
|
||||
'''
|
||||
cur.execute(query)
|
||||
for row in cur.fetchall():
|
||||
category_name = row[1]
|
||||
category, c = FactCategory.objects.get_or_create(name=category_name)
|
||||
|
||||
fact_text = row[2]
|
||||
nick = row[3]
|
||||
usermask = row[4]
|
||||
nickmask = nick + "!" + usermask
|
||||
fact = Fact.objects.create(category=category, fact=fact_text, nickmask=nickmask)
|
||||
except NoOptionError as noe:
|
||||
sys.exit("Aborted due to error in config: {0:s}".format(str(noe)))
|
||||
|
@ -1,38 +0,0 @@
|
||||
from ConfigParser import ConfigParser, NoOptionError
|
||||
import os
|
||||
import sys
|
||||
|
||||
from karma.models import KarmaKey, KarmaLogEntry
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
config = ConfigParser()
|
||||
config.read(os.path.expanduser(config_file))
|
||||
|
||||
dbhost = config.get('dr.botzo', 'dbhost')
|
||||
dbuser = config.get('dr.botzo', 'dbuser')
|
||||
dbpass = config.get('dr.botzo', 'dbpass')
|
||||
dbname = config.get('dr.botzo', 'dbname')
|
||||
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8', use_unicode=True)
|
||||
try:
|
||||
cur = db.cursor()
|
||||
query = '''
|
||||
SELECT * FROM karma_log
|
||||
'''
|
||||
cur.execute(query)
|
||||
for row in cur.fetchall():
|
||||
karma_key_name = row[1]
|
||||
karma_key, c = KarmaKey.objects.get_or_create(key=karma_key_name)
|
||||
|
||||
delta = row[2]
|
||||
nick = row[3]
|
||||
usermask = row[4]
|
||||
nickmask = nick + "!" + usermask
|
||||
karmatime = row[5]
|
||||
karma_log = KarmaLogEntry.objects.create(key=karma_key, delta=delta, nickmask=nickmask, created=karmatime)
|
||||
except NoOptionError as noe:
|
||||
sys.exit("Aborted due to error in config: {0:s}".format(str(noe)))
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
from ConfigParser import ConfigParser, NoOptionError
|
||||
import os
|
||||
import sys
|
||||
|
||||
from pi.models import PiLog
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
config = ConfigParser()
|
||||
config.read(os.path.expanduser(config_file))
|
||||
|
||||
dbhost = config.get('dr.botzo', 'dbhost')
|
||||
dbuser = config.get('dr.botzo', 'dbuser')
|
||||
dbpass = config.get('dr.botzo', 'dbpass')
|
||||
dbname = config.get('dr.botzo', 'dbname')
|
||||
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8', use_unicode=True)
|
||||
try:
|
||||
cur = db.cursor()
|
||||
query = '''
|
||||
SELECT * FROM pi_log
|
||||
'''
|
||||
cur.execute(query)
|
||||
for row in cur.fetchall():
|
||||
count_inside = row[1]
|
||||
count_total = row[2]
|
||||
pi_log = PiLog.objects.create(count_inside=count_inside, count_total=count_total)
|
||||
except NoOptionError as noe:
|
||||
sys.exit("Aborted due to error in config: {0:s}".format(str(noe)))
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
from ConfigParser import ConfigParser, NoOptionError
|
||||
import os
|
||||
import sys
|
||||
|
||||
from seen.models import SeenNick
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
config = ConfigParser()
|
||||
config.read(os.path.expanduser(config_file))
|
||||
|
||||
dbhost = config.get('dr.botzo', 'dbhost')
|
||||
dbuser = config.get('dr.botzo', 'dbuser')
|
||||
dbpass = config.get('dr.botzo', 'dbpass')
|
||||
dbname = config.get('dr.botzo', 'dbname')
|
||||
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8', use_unicode=True)
|
||||
try:
|
||||
cur = db.cursor()
|
||||
query = '''
|
||||
SELECT * FROM seen_nicks
|
||||
'''
|
||||
cur.execute(query)
|
||||
for row in cur.fetchall():
|
||||
seen_nick = SeenNick()
|
||||
seen_nick.nick = row[0]
|
||||
seen_nick.channel = row[1]
|
||||
seen_nick.host = row[2]
|
||||
seen_nick.seen_time = row[3]
|
||||
seen_nick.what = row[4]
|
||||
seen_nick.save()
|
||||
except NoOptionError as noe:
|
||||
sys.exit("Aborted due to error in config: {0:s}".format(str(noe)))
|
||||
|
||||
# vi:tabstop=4:expandtab:autoindent
|
Loading…
Reference in New Issue
Block a user