跳转到主要内容

在OLX和单XML格式之间转换edX课程。

项目描述

xbundle 在OLX和“xbundle”风格XML格式之间互相转换。xbundle格式是一个单独的XML文件。

OLX格式定义在此文档中。

安装

python setup.py install

这将安装xbundle 和命令行工具 xbundle_convert


在代码中使用xbundle

从xbundle转换为OLX

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)

从OLX转换为xbundle

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

或者

xbundle_convert convert /path/to/output.xml /path/to/course


运行测试

xbundle_convert test

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

xbundle-0.3.1.tar.gz (10.9 kB 查看散列)

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面