1 # -*- coding: utf-8 -*-
2 from os.path import basename
4 from django.core.management.base import BaseCommand
6 from catalogue.xml_tools import wl2_to_wl1
9 class Command(BaseCommand):
10 help = 'Converts a lesson XML from WL2 to WL1'
13 def handle(self, filename, *args, **options):
14 slug = basename(filename).split('.')[0]
15 print wl2_to_wl1(open(filename).read(), slug)