Skip to content

Instantly share code, notes, and snippets.

@HarHar
Last active December 11, 2015 00:09
Show Gist options
  • Save HarHar/4514541 to your computer and use it in GitHub Desktop.
Save HarHar/4514541 to your computer and use it in GitHub Desktop.
Put this on the Futaam root
#!/usr/bin/env python
from interfaces.common import *
from libYAAM import YAAMDb
olddb = raw_input('Path to YAAM database file> ')
newdb = raw_input('Path to new Futaam file> ')
o = YAAMDb(olddb)
ni = []
i = 0
for x in o.entries:
a = {}
for y in x:
if x[y] == 'null': x[y] == ''
a['name'] = x['name']
a['id'] = i
a['genre'] = x['genre']
a['lastwatched'] = x['LW']
a['obs'] = x['obs']
a['type'] = o.dbclass
ts = x['status']
if ts.lower() == 'n': ts = 'd'
a['status'] = ts
a['aid'] = x['id']
ni.append(a)
i += 1
parser.createDB(newdb, 'json', o.dbname, 'Imported from YAAM', ni)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment