semvec/pypi-packages huggingface dataset:
jsdoc-parser 0.1.1
A library for parsing and composing JSDoc strings
License: MIT
Requires Python: >=3.7
Keywords: jsdoc, parser, docstring

# JSDoc Parser

[![Tests](https://github.com/Penify-dev/jsdoc-parser/actions/workflows/tests.yml/badge.svg)](https://github.com/Penify-dev/jsdoc-parser/actions/workflows/tests.yml)
[![Python Package](https://github.com/Penify-dev/jsdoc-parser/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Penify-dev/jsdoc-parser/actions/workflows/python-publish.yml)
[![codecov](https://codecov.io/gh/Penify-dev/jsdoc-parser/branch/main/graph/badge.svg)](https://codecov.io/gh/Penify-dev/jsdoc-parser)
[![PyPI version](https://badge.fury.io/py/jsdoc-parser.svg)](https://badge.fury.io/py/jsdoc-parser)
[![Python Versions](https://img.shields.io/pypi/pyversions/jsdoc-parser.svg)](https://pypi.org/project/jsdoc-parser/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python library for parsing and composing JSDoc strings.

## Installation

```bash
pip install jsdoc-parser
```

## Usage

```python
from jsdoc_parser import parse_jsdoc, compose_jsdoc

# Parse a JSDoc string into an object
jsdoc_str = """/**
 * Calculates the sum of two numbers
 * @param {number} a - First number
 * @param {number} b - Second number
 * @returns {number} The sum of a and b
 */"""

parsed = parse_jsdoc(jsdoc_str)
print(parsed)
# Output: {'description': 'Calculates the sum of two numbers', 'params': [{'name': 'a', 'type': 'number', 'description': 'First number'}, {'name': 'b', 'type': 'number', 'description': 'Second number'}], 'returns': {'type': 'number', 'description': 'The sum of a and b'}}

# Modify the parsed object
parsed['params'][0]['description'] = 'Modified description'

# Compose the modified object back to a JSDoc string
new_jsdoc = compose_jsdoc(parsed)
print(new_jsdoc)
```

## Features

- Parse JSDoc strings into structured Python objects
- Compose JSDoc objects back into properly formatted JSDoc strings
- Support for various JSDoc tags: @param, @returns, @throws, etc.
- Easy manipulation of JSDoc components

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)
mkdocs-suppress-logs-plugin 0.1.1
MkDocs plugin to suppress unwanted log messages using pattern matching.
License: MIT
Requires Python: >=3.7

﻿# Suppress Logs Plugin for MkDocs

MkDocs and its plugins often produce many **informational log messages** that, while helpful, can clutter your terminal during site builds and make real issues harder to spot.

This plugin allows you to **silence specific log messages** using customizable wildcard patterns. It's especially useful for suppressing known, non-critical log lines such as:

```
INFO    -  Doc file 'some.md' contains an absolute link '/path', it was left as is.
INFO    -  Doc file 'other.md' contains an unrecognized relative link '../foo', it was left as is.
```

## 💡 Use Case

If you're using plugins like [`mkdocs-webcontext-plugin`](https://github.com/darrelk/mkdocs-webcontext-plugin) to rewrite links or your site intentionally contains absolute or unresolved relative links, this plugin can filter those benign warnings.

## ✅ Features

* Pattern-based filtering of log messages.
* Wildcard support using `{*}` for variable sections.
* Supports multiple loggers (like `mkdocs.structure.pages`, etc.).
* Keeps your terminal output clean and focused.

---

## 📦 Installation

Install from PyPI:

```bash
pip install mkdocs-suppress-logs-plugin
```

Or with Poetry:

```bash
poetry add mkdocs-suppress-logs-plugin
```

---

## ⚙️ Configuration

Add the plugin to your `mkdocs.yml`:

```yaml
plugins:
  - suppress_logs:
      patterns:
        - "Doc file '{*}' contains an absolute link '{*}', it was left as is."
        - "Doc file '{*}' contains an unrecognized relative link '{*}', it was left as is. Did you mean '{*}'?"
      loggers:
        - mkdocs.structure.pages
```

### 🔧 Pattern Matching

Use `{*}` as a wildcard in messages you want to suppress.

**Example log line:**

```
INFO    -  Doc file 'guide.md' contains an absolute link '/img.png', it was left as is.
```

**Matching pattern:**

```
Doc file '{*}' contains an absolute link '{*}', it was left as is.
```

This will suppress any message with that general structure, regardless of the exact file or link.

---

## 🧪 Tips

* To find the logger emitting a message, run MkDocs with `--verbose`.
* You can add multiple patterns and logger names.
* Regex is used under the hood, so avoid overly broad wildcards.

---

## 🙏 Thanks

This plugin was inspired by the need for clean terminal outputs during large MkDocs builds and complements:

* [mkdocs-webcontext-plugin](https://github.com/darrelk/mkdocs-webcontext-plugin)

---

## 🗪 License

MIT License – use freely, contribute generously.