semvec/pypi-packages huggingface dataset:
prosemirror-py-converter 0.3
Python simple implementation of converting ProseMirror doc to markdown
License: MIT
Keywords: prosemirror markdown pmconverter html python-converter

# prosemirror-py-converter

[中文指引](https://github.com/ghnjk/prosemirror-py-converter/blob/main/README_CN.md)

Python simple implementation of converting ProseMirror doc to markdown

## Core features

- Based on [ProseMirror basic model](https://prosemirror.net/docs/ref/#model)
- Support custom extension
- ProseMirror document converter: Json to Markdown in ProseMirror format
- Mainly used for data analysis and display after spider ProseMirror documents.

## Quick start

- Install prosemirror-py-converter

```
pip3 install prosemirror-py-converter
```

- Convert ProseMirror document to Markdown

```
from pmconverter import prose2markdown

doc = {
     "type": "doc",
     "content": [
         {
             "type": "heading",
             "attrs": {
                 "level": 3
             },
             "content": [
                 {
                     "type": "text",
                     "text": "Example heading."
                 }
             ]
         }
     ]
}
print(prose2markdown(doc))
```

- output markdown

```
### Example heading.
```

## Standard ProseMirror implementation

- [Standard ProseMirror implementation](https://github.com/ghnjk/prosemirror-py-converter/blob/main/pmconverter/prose_mirror_std_models.py)

### mark type list

- link
- bold
- strong
- code
- italic
- strike
- subscript
- superscript
- underline

### node type list

- doc
- heading
- paragraph
- image
- bullet_list
- ordered_list
- table
- blockquote
- code_block
- hard_break
- horizontal_rule

## Custom ProseMirror extension examples

[iwiki doc converter](https://github.com/ghnjk/prosemirror-py-converter/blob/main/pmconverter/extensions/iwiki_models.py)

- custom mark converter example

```
from pmconverter.basic_model import CommonSimpleMark
from pmconverter.model_factory import register_mark_class


class CustomMark(CommonSimpleMark):

    def __init__(self):
        super().__init__()
        self.type = "custom_mark"
        self.md_pre_mark = "<u>"
        self.md_after_mark = "</u>"


register_mark_class("custom_mark", CustomMark)
```

- custom node converter example

```
from pmconverter.basic_model import Node
from pmconverter.model_factory import register_node_class


class CustomeImage(Node):

    def __init__(self):
        super().__init__()
        self.type = "custom_image"

    def convert_to_markdown(self, **kwargs) -> str:
        name = self.get_attr("name", "")
        url = self.get_attr("url", "")
        return f"![{name}]({url})"
        

register_node_class("custom_image", CustomeImage)
```
deepseis 0.0.0
Deep learnig-based seismological application
License: MIT
Requires Python: ==3.8.8

# SAIPy
Seismology has witnessed significant advancements in recent years with the application of deep learning methods to address a broad range of problems. These techniques have demonstrated their remarkable ability to effectively extract statistical properties from extensive datasets, surpassing the capabilities of traditional approaches to an extent. In this repository we present SAIPy, an open-source Python package developed for fast seismic waveform data processing by implementing deep learning. SAIPy offers solutions for multiple seismological tasks such as earthquake detection, magnitude estimation, seismic phase picking, and polarity identification. This brings together the capabilities of previously published models such as [CREIME](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2022JB024595), [Dynapicker](https://arxiv.org/abs/2211.09539v1?trk=public_post_main-feed-card_feed-article-content) and [PolarCAP](https://www.sciencedirect.com/science/article/pii/S2666544122000247) and introduces upgraded versions of previously published models such as CREIME_RT capable of identifying earthquakes with an accuracy above 99.8% and a root mean squared error of 0.38 unit in magnitude estimation. These upgraded models outperform state-of-the-art approaches like the Vision Transformer network. SAIPy provides an API that simplifies the integration of these advanced models with benchmark datasets like STEAD and INSTANCE. The package can be implemented on continuous waveforms and has the potential to be used for real-time earthquake monitoring to enable timely actions to mitigate the impact of seismic events.
mkdocs-img2fig-plugin-with-icons 0.0.2
A MkDocs plugin that converts markdown encoded images into <figure> elements.
License: MIT
Requires Python: >=3.5
Keywords: mkdocs python markdown icons

# MkDocs Img2Fig Plugin

This [MkDocs](https://www.mkdocs.org) plugin converts markdown encoded images like

```
![An image caption](\assets\images\my-image.png)
```

into 

```html
<figure class="figure-image">
  <img src="\assets\images\my-image.png" alt="An image caption">
  <figcaption>An image caption</figcaption>
</figure>
```

## Requirements

This package requires Python >=3.5 and MkDocs version 1.0 or higher.  

## Installation

Install the package with pip:

```cmd
pip install mkdocs-img2fig-plugin
```

Enable the plugin in your `mkdocs.yml`:

```yaml
plugins:
    - search
    - img2fig
```

**Note:** If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set, but now you have to enable it explicitly.

More information about plugins in the [MkDocs documentation](https://www.mkdocs.org/user-guide/plugins/)