Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pyrustymd

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyrustymd

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

PyRustyMD

WIP! Markdown Parser written in Rust for the PixelCampus.space Wiki to support custom tags and other features.

Features

  • Parse Markdown
  • Parse HTML-Style Tags
  • Allow only certain Tags
  • Allow only certain Attributes per Tag
  • markdown like additions specific to PixelCampus.space Wiki

Returns a JSON Object like:

[
    {
        "content": [
            "test",
            {
                "content": [
                    "test2"
                ],
                "tag": "span",
                "attributes": {
                    "id": "spn",
                    "class": []
                }
            }
        ],
        "tag": "div",
        "attributes": {
            "style": "left: 10px;",
            "class": [
                "test",
                "abc"
            ]
        }
    }
]

from this HTML:

<div style="left: 10px;" class="test abc">
    test
    <span id="spn">test2</span>
</div>

Usage

from pyrustymd import parse

json = parse("<your html here>")

Development setup

# Create virtualenv
python3 -m venv .env

# Activate virtualenv
source .env/bin/activate

# Install maturin
pip install maturin

# Build
maturin develop

Then just import it in your python script having the same virtualenv activated.

Release History

  • 0.1.2

    • Add License and Readme
  • 0.1.1

    • Changed package name and published to PyPi
  • 0.1.0

    • Basic functionality for parsing HTML-Style Tags

Meta

Frederik Beimgraben – Website | GitHub

Distributed under the GPL-3.0 license. See LICENSE for more information.

PixelCampus – Website | GitHub

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc