Skip to main content

A package to convert between markup documents and a forest data structure for efficient processing.

Project description

pydelorean

delorean

A library to convert markup documents into tree data structures and vice versa. There is greater functionality available to modify, prune, add and delete parts of documents when there are in the MarkdownTree structure.

The full list of features can be found in FEATURES.md or in the documentation.

Install

Install via pip

   pip install pydelorean

You can find the library page here here <nil>__

Quick Usage Guide

The library can be used to convert markdown documents into forest data strucutre. Using just the treeify command on the following text

# Chikin Tales
Once there was a chikin.
## Chapter 1 : Chikin Fly
Chickens don't fly. They do only the following:
- waddle
- plop 
### Waddling
A waddle is what these birds do.
## Chapter 2 : Chikin Scream
### Plopping
Plopping involves three steps:
1. squawk
2. plop
3. repeat, unless ordered to squat
   from pydelorean import treeify
   tree = treeify(text)
   print(tree)
                   Chikin Tales
                  /     \       \
                 /       \       \
           (Once th..)    |       \
                          |        \
                      Chapter 1     \
                      /     |     Chapter 2
                     /      |         |
           (Chickens do..)  |       Plopping
                            |         |
                         Waddling   (Plopping...)
                            |
                        (A waddle...)

For a usage guide, access the samples/ directory or check out the documentation page here - nil

Features

Some of the features of this library are:

  • forest data structure for Markdown, reStructuredText, AsciiDoc, JSON, YAML and XML.
  • 'cleaning' of documents to remove unwanted elements.
  • document manipulation using the tree data structure.
  • document generation from tree data structure.

License

This project is licensed under the Apache 2.0 License. A copy of the license can be found in the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydelorean-1.5.4.tar.gz (64.2 kB view hashes)

Uploaded Source

Built Distribution

pydelorean-1.5.4-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page