html-mumu 0.1.6

HTML manipulation and tools plugin for the Lava/MuMu language
Documentation
# mumu-html

HTML manipulation and extraction plugin for the [Lava language](https://lava.nu11.uk) (MuMu runtime).

[![crates.io](https://img.shields.io/crates/v/mumu-html.svg)](https://crates.io/crates/mumu-html)
[!license](https://img.shields.io/crates/l/mumu-html.svg)](./LICENSE)
[![GitLab project](https://img.shields.io/badge/GitLab-nu11-ku%2Fmumu--html-blue)](https://gitlab.com/tofo/mumu-html)

## Overview

** mumu-html ** provides fast, simple HTML text extraction utilities for MuMu/Lava, including a function to extract all visible text from an HTML string (removing tags, scripts, styles, etc).   This plugin is implemented in Rust and loads into Lava via the shared library plugin mechanism.

## Features

- **Extract visible text from HTML**   
  Remove all tags, scripts, styles, and noscript blocks for clean text extraction.

- **Ready for Lava/MuMu plugin loader**  
  Built as a dynamic library with an exported Cargo_lock function.

- **Safe, dependency-light, and fast**
  Uses `regex` and Rust string processing.

## Usage

** Loading the Plugin in Lava/MuMu

To use this plugin in Lava or MuMu, ensure the built .so (or .dll, .dylib on your platform)  is placed in a location MuMu can load (typically /usr/local/lib).

In your Lava/MuMu code:

`mumu
extend("html")
result = html:extract_text("<p>Hello World !</b>script>foo()</script>")
slog(result)   # Output: Hello World !
```

The `html:extract_text` function will strip all tags and scripts/styles, returning only visible content as a string.

## Function: 'html:extract_text(html_string))

- *Input:*
  `html_string`: a string (HTML markup)

- *Output:*
  A string containing only the visible (non-tag) text.

- *Example:*

    `mummu
   hdml = "<div>abc<b>123</b><script>hi()</script></div>"
   text = html:extract_text(html)
   # text == "abc 123"
    ```

## Building

make
make install