Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/accordproject/markdown-transform
Parse and transform markdown text, including TemplateMark markdown templates
https://github.com/accordproject/markdown-transform
Last synced: about 17 hours ago
JSON representation
Parse and transform markdown text, including TemplateMark markdown templates
- Host: GitHub
- URL: https://github.com/accordproject/markdown-transform
- Owner: accordproject
- License: apache-2.0
- Created: 2019-08-01T15:42:01.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T15:59:06.000Z (2 months ago)
- Last Synced: 2024-10-30T04:29:56.402Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.9 MB
- Stars: 71
- Watchers: 12
- Forks: 50
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Markdown Transform
## Introduction
A transformation and parsing framework for converting markdown content to HTML, PDF, DOCX, Slate (for rich-text editing) and other structured document object models (DOMs).
![Transformations](./packages/markdown-transform/transformations.png)
## Structure of the Code Repository
Top level repository (markdown-transform), with sub packages. Each sub-package is published as an independent npm module using `npm workspaces`:
* [markdown-cli](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cli) : command line utilities
* [markdown-transform](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-transform) : High-level API to transform files into different formats
* [markdown-common](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-common) : converts between markdown strings and the CommonMark DOM
* [markdown-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cicero) : converts between the CommonMark DOM and the CiceroMark DOM
* [markdown-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-template) : converts between JSON data + markdown strings and TemplateMark
* [markdown-slate](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-slate) : converts between the CiceroMark DOM and the Slate DOM
* [markdown-html](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-html) : converts between the CiceroMark DOM and HTML
* [markdown-pdf](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-pdf) : converts between a PDF file and the CiceroMark DOM
* [markdown-docx](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-docx) : converts a DOCX file to the CiceroMark DOM
* [markdown-it-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-cicero) : markdown-it plugin for contracts and CiceroMark
* [markdown-it-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-template) : markdown-it plugin for templates and TemplateMark### CommonMark DOM
The CommonMark DOM is a model for the elements of CommonMark (the specification for markdown text), expressed as a [Concerto schema](https://github.com/accordproject/concerto), and serialized as a JSON graph.
The schema is defined here: https://models.accordproject.org/markdown/[email protected]
### CiceroMark DOM
CiceroMark defines markdown documents with embedded clauses, where each clause is an instance of a template, specified using TemplateMark.
The CiceroMark DOM extends the CommonMark DOM, defining nodes for `Clause`, `Variable` and `Formula` etc.
The schema is defined here: https://models.accordproject.org/markdown/[email protected]
### TemplateMark DOM
TemplateMark defines markdown documents with syntax for embedded variables, optional blocks, formulas etc. It is used to define Accord Project templates.
The TemplateMark DOM extends the CommonMark DOM, defining nodes for `ClauseDefinition`, `VariableDefinition` and `ForumulaDefinition` etc.
The schema is defined here: https://models.accordproject.org/markdown/templatemark.html
### Slate DOM
The Slate DOM is defined by the [Slate](https://www.slatejs.org) HTML content-editable WYSIWYG editing framework.
## Installation
### For users
To install the command-line interface:
```
npm install -g @accordproject/markdown-cli
```This will install the `markus` command-line for markdown transform. To get command-line help:
```
markus --help
```### For developers
```
npm install
```Then run:
```
npm run test
```This command uses npm workspaces to run the tests for each package in the monorepo.
---
Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the [Linux Foundation][linuxfound]. The technical charter for the Accord Project can be found [here][charter].
## Learn More About Accord Project
### [Overview][apmain]
### [Documentation][apdoc]
## Contributing
The Accord Project technology is being developed as open source. All the software packages are being actively maintained on GitHub and we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code.
Find out what’s coming on our [blog][apblog].
Join the Accord Project Technology Working Group [Discord channel][apdiscord] to get involved!
For code contributions, read our [CONTRIBUTING guide][contributing] and information for [DEVELOPERS][developers].
### README Badge
Using Accord Project? Add a README badge to let everyone know: [![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)
```
[![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)
```Accord Project source code files are made available under the [Apache License, Version 2.0][apache].
Accord Project documentation files are made available under the [Creative Commons Attribution 4.0 International License][creativecommons] (CC-BY-4.0).Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respective owners. See [LF Projects Trademark Policy](https://lfprojects.org/policies/trademark-policy/).
[linuxfound]: https://www.linuxfoundation.org
[charter]: https://github.com/accordproject/governance/blob/main/accord-project-technical-charter.md
[apmain]: https://accordproject.org/
[apblog]: https://medium.com/@accordhq
[apdoc]: https://docs.accordproject.org/
[apdiscord]: https://discord.gg/Zm99SKhhtA[contributing]: https://github.com/accordproject/markdown-transform/blob/main/CONTRIBUTING.md
[developers]: https://github.com/accordproject/markdown-transform/blob/main/DEVELOPERS.md[apache]: https://github.com/accordproject/markdown-transform/blob/main/LICENSE
[creativecommons]: http://creativecommons.org/licenses/by/4.0/