Skip to content

kraenzle-ritter/markdown-to-ead

Repository files navigation

Markdown To EAD

Latest Version on Packagist Total Downloads Tests

Don´t use this package. It has a very special pupose within anton (anton.ch).

Convert Markdown Snippets to EAD 2002.

Markdown EAD
#, ##, etc <p> (since ead does not allow titles, heads within the fields
Lists <list>
ListItems (*) <item>
Links [text](url) <extref xlink:href="url">text</extref>
Strong (**bold**) <emph render="bold">
Emaphasis (_italic_) <emph render="italic">

Installation

composer require kraenzle-ritter/markdown-to-ead

Usage

use KraenzleRitter\MarkdownToEad\Convert;

$markdown = '# Überschrift

Paragraph _kursiv_ **fett**

- Item 1
- Item 2

Inline [Link](url).
';

$converter = new Convert();
$xml = $converter->toEad($markdown);

/**
<head>Überschrift</head><p>Paragraph <emph render="italic">kursiv</emph> <emph render="bold">fett</emph></p><list><item>Item 1</item><item>Item 2</item></list><p>Inline <extref xlink:href="url">Link</extref>.</p>
*/

License

MIT. Please see the license file for more information.