1.0.0 • Published 9 months ago
@projects-md/markdown-entity-parser v1.0.0
markdown-entity-parser
Parse entities from markdown files into JSON/YAML via CLI or NodeJS API
Requirements
- Node.js >= 18
Usage
Installation
npm install @projects-md/markdown-entity-parser
Usage via Node.js API
import { parseStructuredMarkdown } from '@projects-md/markdown-entity-parser';
const markdown = `
# {project} Project A
Description Text
`;
const entities = parseStructuredMarkdown(markdown);
console.log(entities);
Output:
{
"project": [
{
"name": "Project A",
"description": "Description Text"
}
]
}
Usage via CLI
You can use the CLI to parse markdown files into YAML.
./node_modules/.bin/markdown-entity-parser source.md > target.yaml
Syntax Example
# {project} Project A
```yaml
color: '#00fbff'
```
Project Desciption
## {milestone} Research
```yaml
team: Team A
release: 23.7
```
Milestone Description
### {task} Task 1
```yaml
sprint: 23.7 S1
estimate: 8
assignee: john.doe
status: In Progress
```
Optional Task Description
### {task} Task 2
```yaml
sprint: 23.7 S1
estimate: 3
assignee: john.doe
status: Done
```
### {task} Task 3
```yaml
sprint: 23.7 S2
estimate: 5
```
1.0.0
9 months ago