Metadata-Version: 2.4
Name: olx-utils
Version: 0.6.0
Summary: Utilities for edX OLX courses
Home-page: https://github.com/cleura/olx-utils
License: AGPL-3.0-only
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
Classifier: Topic :: Education
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Mako>=1.0.3
Requires-Dist: markdown2>=2.3.0
Requires-Dist: Pygments>=2.0.1
Requires-Dist: python-swiftclient>=2.2.0
Requires-Dist: requests
Requires-Dist: xmltodict
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

This repository was previously hosted under the `hastexo` GitHub organization, and moved to `cleura` in December 2025 as part of a routine repository consolidation.

# OLX Utilities

A set of tools to facilitate courseware development using the [Open Learning XML](http://edx.readthedocs.io/projects/edx-open-learning-xml/en/latest/) (OLX) format.

OLX is sometimes tediously repetitive, and this package enables courseware authors to apply the [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) principle when writing OLX content.
It allows you to create templates (using [Mako](http://www.makotemplates.org/)), which in turn enable you to

- define OLX fragments only once, to reuse them as often as you want (this comes in very handy in using the [stackamole XBlock](https://github.com/cleura/stackamole-xblock)),
- write courseware content in [Markdown](https://en.wikipedia.org/wiki/Markdown),
- do anything else you would like to do using your own plugins.

## Install

Install the `olx-utils` package from PyPI:

```bash
pip install olx-utils
```

## Apply templates to a course

In order to create a new course run named `newrun`, starting on May 1, 2026 and ending on October 31, 2027, change into your courseware checkout and run:

```bash
olx new-run -b newrun 2026-05-01 2027-10-31
```

The `-b` option causes your rendered OLX to be added to a new Git branch named `run/newrun`, which you can then import into your Open edX content store.

You can also invoke `olx new-run` as `new_run.py`.
However, this is deprecated and its use is discouraged.
`new_run.py` will go away in a future release.

## License

This package is licensed under the [GNU Affero GPL](https://tldrlegal.com/l/agpl3); see [LICENSE](https://www.gnu.org/licenses/agpl-3.0.txt) for details.
