LCG Framework
LCG is a Python framework for content abstraction and generic document processing. A document is built as a hierarchy of Python objects, independent of any output format, and exported to HTML, PDF, EPUB, Braille and others.
It is meant for developers who need to produce structured documents programmatically -- or read them from a source format -- and publish them in several formats at once. It can also be used directly, as a command line tool turning documents written in a human readable markup into the target format.
What LCG provides
- One document, many formats. Write the content once and export it to HTML, PDF, EPUB, plain text, MS HTML Help or an IMS package for e-learning systems. Each exporter can be extended or replaced.
- Content, not markup. Documents are composed of content elements -- paragraphs, sections, tables, definition lists, quotations, figures, mathematics (MathML), inline SVG, plots, audio and video. Custom elements are just new classes, so the framework grows with the application.
- Braille output that means it. Text is translated through liblouis with the document layout handled by louisutdml, and mathematics is transcribed in the Nemeth code. Documents can be embossed, not just approximated.
- Accessibility as a design goal. The HTML output follows the W3C standards, and the interactive widgets -- foldable trees, notebooks, popup menus, collapsible sections, an audio player -- are operable by keyboard and announced properly by screen readers.
- Internationalization beyond gettext. Translation is deferred until export, so one document tree serves several language variants and may mix languages within a single page. Dates, times, decimal and monetary values are localized, plural forms included.
- Presentation kept apart. Layout and styling are described by presentation sets matched against the content, so the same document can be published in different looks without touching it.
- E-learning exercises. Multiple choice questions, selections, true/false statements, gap filling and other interactive exercise types are built in -- the framework's original purpose, still supported.
License
LCG is Free Software, distributed under the terms of the GNU General Public
License v2 (GPLv2). See the COPYING file for details.
History
LCG stands for Learning Content Generator. It was initially developed to generate online e-learning material for the Eurochance project.
Changelog
For a history of changes in each version, see the changelog.
Installation
LCG is a pure Python library running on Python 3.5 or later and may be
installed by pip install lcg-framework[all]. The last version supporting
Python 2.7 is 0.8.2.
When using PDF output, you additionally need the following system packages:
- Fontconfig (Debian/Ubuntu package
fontconfig) - Freefont (Debian/Ubuntu package
fonts-freefont-ttforttf-freefont)
Usage
LCG comes with a command line tool which can be run directly using python -m lcg.make to build and export documents into different output formats. Run
with --help to find out how to use it.
LCG is also used as a content abstraction layer in the Wiking web application development framework and for document construction and as a print backend in Pytis information systems development framework.
Documentation
The documentation is published at cerha.github.io/lcg.
Its source is also included in the package. To generate the HTML version
locally, run make doc from the package root directory.
Metadata
Release files for lcg-framework 0.9.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lcg_framework-0.9.5.tar.gz | 21.5 MB | Without provenance | Details for lcg_framework-0.9.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lcg_framework-0.9.5-py3-none-any.whl | Python 3 | none | any | Details for lcg_framework-0.9.5-py3-none-any.whl |
Total release size: 32.5 MB
Release files / lcg_framework-0.9.5.tar.gz
| Download URL | lcg_framework-0.9.5.tar.gz |
|---|---|
| Size | 21.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ccebe6ad3ed87260485f52e38c5ac11e382b2d1efe119558d556b23f5f8d315
|
|
BLAKE2b-256 checksum How to use checksums |
518f7884c81dd8b0a1689d37a513044e3f2286a34600a5877f6c13fa506bb861
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / lcg_framework-0.9.5-py3-none-any.whl
| Download URL | lcg_framework-0.9.5-py3-none-any.whl |
|---|---|
| Size | 11.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ac86b30a8b86f49db772c34b3f68ac2de5ef30b2ed7119deaa819e9799289b4
|
|
BLAKE2b-256 checksum How to use checksums |
ee9506376729289386af49fb61f52572a64fe04f84bbf3fa02385eeac857425d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for lcg-framework 0.9.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.