Skip to main content

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

Project description

media/image.png

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 under Features

Install

Install via pip

pip install pydelorean

You can find the library page here here

Quick Usage Guide

delorean offers only one function treeify, which generates a Python object from markup text. The object is a [treelib](https://github.com/caesar0301/treelib) Tree structure.

Take, for example, the following markdown file.

[[ chikin.md ]]

# 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
        Chikin Tales
       /     \       \
      /       \       \
(Once th..)    |       \
               |        \
           Chapter 1     \
           /     |     Chapter 2
          /      |         |
(Chickens do..)  |       Plopping
                 |         |
              Waddling   (Plopping...)
                 |
             (A waddle...)

For the full usage guide, access the SAMPLES.md file.

Features

Some of the features of this library are:

  1. Converts a markdown file to a manipulatable, light Python data structure.

  2. Converts the Python data structure back into a Markdown file.

  3. Traverse and edit the Python 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-0.2.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

pydelorean-0.2.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file pydelorean-0.2.1.tar.gz.

File metadata

  • Download URL: pydelorean-0.2.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for pydelorean-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ad235532c7d1e356f051929a56014c9f3d095ff6c937388903a77c6905e4a30a
MD5 dd0ee47b818d1776eb561c25c2250d7c
BLAKE2b-256 dff195dc90114cb1d0051d599bd0db7886ab85e94acab5da9b8605aa5ba6c427

See more details on using hashes here.

File details

Details for the file pydelorean-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pydelorean-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for pydelorean-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb33a1a16b4f41856cf6dae9ae33f7f3db114b742dbb335fd3b02c2e096e9fba
MD5 75e33ba2646f034e4943a7a065118d6a
BLAKE2b-256 bf01e2fc4bb8c8e000c2904525ae7b98301262c041d5dcbe251a74ddf647304a

See more details on using hashes here.

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