A XAML writer from reStructured Text source.
The goal is to be able to write out FlowDocument XAML from ReST documents for use in WPF and Silverlight / Moonlight projects.
It includes a Pygments formatter for outputting a syntax highlighted XAML representation of source code.
rst2xaml itself runs under CPython, but the generated XAML is intended for use from IronPython (or any other .NET language). There is an example IronPython script for displaying the generated XAML using a WPF FlowDocumentReader.
Requirements
rst2xaml depends on:
Tested with Python 2.5 and 2.6, but probably works fine under Python 2.4.
The Silverlight output is intended to work with Moonlight (the equivalent of Silverlight 2) and Silverlight 3. Let me know if there are any problems.
Current status
The docutils writer for both FlowDocument and Silverlight XAML can currently handle the following markup features:
title and headings
paragraphs
bold
italics
literal blocks
inline literals
line blocks
bullet lists
enumerated lists
blockquotes
the raw:: xaml directive
the pygments code-block directive
In addition the FlowDocument output can handle superscript, although that only works for fonts that support it.
Nested enumerated lists don’t yet work correctly for either FlowDocument or Silverlight output.
Scripts
There are three scripts that come with rst2xaml:
python rst2xaml.py source.txt output.xaml python rst2xamlsl.py silverlight-source.txt silverlight-output.xaml ipy.exe display_xaml.py output.xaml
If display_xaml.py is run without a command line argument it will open a file dialog for you to choose a xaml file to display.
Tests
The tests use the discover module, which is included in the repository for convenience. You run the tests with:
python discover.py
Development
The development version of rst2xaml is hosted on a google project page:
CHANGELOG
2009/08/29 Version 0.1.1
Bottom margin on list items increased.
Addition of xclass option for the Silverlight XAML, for use from Try Python.
2009/08/20 Version 0.1.0
Initial release.
Metadata
Release files for rst2xaml 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rst2xaml-0.1.1.zip | 24.4 kB | Without provenance | Details for rst2xaml-0.1.1.zip | |
| rst2xaml-0.1.1.tar.gz | 19.5 kB | Without provenance | Details for rst2xaml-0.1.1.tar.gz |
Release files / rst2xaml-0.1.1.zip
| Download URL | rst2xaml-0.1.1.zip |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c55433d116d0dfb385e61e4c4ec91fd9af9dfef39d28b470773a1c718ea8094d
|
|
BLAKE2b-256 checksum How to use checksums |
f18064b7d32f0fe28e7b5ac79607892ad3ae30e5a7e034c5f51344647f2b0a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / rst2xaml-0.1.1.tar.gz
| Download URL | rst2xaml-0.1.1.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1752be62021de5a9337710c6486a5aac1ebf9eb6c10aca94d41baa9357353d60
|
|
BLAKE2b-256 checksum How to use checksums |
2258adf01a0e453a654ca915ed272e6b08f2a2039866146a3817bf15e8e1c948
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rst2xaml 0.1.1
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.