Metadata-Version: 2.4
Name: markitdown-cosense
Version: 0.1.0
Summary: A markitdown plugin for converting Scrapbox notation to Markdown
Author-email: kazu728 <kazuki.matsuo.728@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/kazu728/markitdown-cosense
Project-URL: Repository, https://github.com/kazu728/markitdown-cosense
Project-URL: Issues, https://github.com/kazu728/markitdown-cosense/issues
Keywords: markitdown,scrapbox,markdown,converter,plugin
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: markitdown>=0.1.1
Dynamic: license-file

# markitdown-cosense

A [markitdown](https://github.com/microsoft/markitdown) plugin for converting Scrapbox notation to Markdown.

## Features

This plugin converts various Scrapbox notations to standard Markdown format:

- **Headings**: `[* Heading]` → `# Heading`
- **Text decorations**: `[/ italic]`, `[- strikethrough]`, `[** bold]`
- **Lists**: Indented lines with spaces, tabs, or full-width spaces
- **Code blocks**: `code:language` notation
- **Tables**: `table:name` notation
- **Links and images**: `[title url]`, `[img url]`
- **Math expressions**: `[$ formula $]` → `$formula$`
- **LaTeX blocks**: `code:tex` with mathematical content

## Installation

```bash
pip install markitdown-cosense
```

## Usage

### With markitdown CLI

```bash
# List available plugins
markitdown --list-plugins

# Convert a file using the plugin
markitdown --use-plugins your-file.txt
```

### Programmatic usage

```python
from markitdown import MarkItDown
from markitdown_cosense import register_converters

# Initialize markitdown
md = MarkItDown()

# Register the converter
register_converters(md)

# Convert a file
result = md.convert("your-scrapbox-file.txt")
print(result.text_content)
```

## Features

- Converts Scrapbox notation to standard Markdown
- Handles headings, formatting, links, images, lists, tables, code blocks, and math notation
- Converts tags `[tag]` to HTML comments `<!-- tag: tag -->` to preserve information while maintaining valid Markdown

## Examples

### Input (Scrapbox notation)

```
[* Project Title]

[** Overview]
This project is about [/ converting] Scrapbox notation.

Features:
 Main feature
  Sub feature 1
  Sub feature 2
 Another feature

code:python
def hello():
    print("Hello, World!")

table:Results
 Name Score Grade
 Alice 95 A
 Bob 87 B
```

### Output (Markdown)

```markdown
# Project Title

## Overview
This project is about *converting* Scrapbox notation.

Features:
- Main feature
  - Sub feature 1
  - Sub feature 2
- Another feature

```python
def hello():
    print("Hello, World!")
```

## Results

| Name | Score | Grade |
|---|---|---|
| Alice | 95 | A |
| Bob | 87 | B |
```
