xbundle
converts back and forth between OLX and "xbundle" style XML
formats. The xbundle format is a single XML file.
The OLX format is defined in this documentation.
python setup.py install
This will install xbundle
and the xbundle_convert
command-line
tool.
from xbundle import XBundle
bundle = XBundle()
# get input_path and output_path from user input
bundle.load(input_path)
bundle.export_to_directory(output_path)
from xbundle import XBundle
bundle = XBundle()
# get input_path and output_path from user input
bundle.import_from_directory(input_path)
bundle.save(output_path)
xbundle_convert convert /path/to/course /path/to/output.xml
or
xbundle_convert convert /path/to/output.xml /path/to/course
xbundle_convert test