Metadata-Version: 2.4
Name: paperflow-postprocess
Version: 0.1.0
Summary: PaperFlow markdown post-processing for citations, figures, tables, and frontmatter.
Author: PaperFlow
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://paperflowing.com
Keywords: markdown,obsidian,citations,latex,paperflow
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# paperflow-postprocess

`paperflow-postprocess` packages the PaperFlow markdown post-processing logic as a reusable Python module.

It converts raw academic markdown into an Obsidian-friendly format by:

- normalizing LaTeX delimiters
- converting numbered citations into footnotes
- linkifying figure and table references
- injecting YAML frontmatter

## Install

```bash
pip install paperflow-postprocess
```

## Usage

```python
from paperflow_postprocess import postprocess

raw_markdown = """
Text with citation [1].

## References

[1] Example Author. Example Paper.
"""

markdown = postprocess(
    raw_markdown=raw_markdown,
    images={},
    metadata={
        "title": "Example Paper",
        "authors": ["Example Author"],
        "source": "https://example.com/paper",
        "date": "2026-03-11",
    },
)

print(markdown)
```

## API

- `postprocess(raw_markdown, images, metadata)`
- `fix_latex_delimiters(md)`
- `clean_headers_footers(md)`
- `convert_to_footnotes(md)`
- `linkify_figures(md)`
- `linkify_tables(md)`
- `inject_frontmatter(md, metadata)`
