https://github.com/mlewand/rtf-parse
A simplified RTF parser.
https://github.com/mlewand/rtf-parse
node nodejs parser rtf
Last synced: 3 months ago
JSON representation
A simplified RTF parser.
- Host: GitHub
- URL: https://github.com/mlewand/rtf-parse
- Owner: mlewand
- License: mit
- Created: 2017-01-31T22:10:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-31T11:12:18.000Z (about 6 years ago)
- Last Synced: 2024-04-14T07:14:14.519Z (almost 2 years ago)
- Topics: node, nodejs, parser, rtf
- Language: JavaScript
- Size: 2.08 MB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtf-parse
[](https://badge.fury.io/gh/mlewand%2Frtf-parse)
[](https://ci.appveyor.com/project/mlewand/rtf-parse)
[](https://travis-ci.org/mlewand/rtf-parse)
[](https://codecov.io/gh/mlewand/rtf-parse)
[](https://david-dm.org/mlewand/rtf-parse)
[](https://github.com/mlewand/rtf-parse/issues)
[](https://github.com/mlewand/rtf-parse/issues)
> A simplified RTF parser.
## Installation
```sh
$ npm install --save rtf-parse
```
## Usage examples
```javascript
const rtfParse = require( 'rtf-parse' ),
path = require( 'path' );
rtfParse.parseFile( path.join( '_fixtures', 'rtfSimple.rtf' ) )
.then( doc => {
// Do anything you like with rtf.model.Document instance of your document.
} );
```
```javascript
const rtfParse = require( 'rtf-parse' );
rtfParse.parseString( '{\\rtf1 foobar}' )
.then( doc => {
// Do anything you like with rtf.model.Document instance of your document.
} );
```
You can find more usage examples in [examples](examples) directory.
Also you could also browse tests to see how the API is used.
## Contribute
This is fully open source pet project, if you feel you're in a mood for a pull request, you're more than welcome to do so!
### Getting In Touch
You can always ping me at Twitter [@m_lewand](https://twitter.com/m_lewand).
## License
MIT © Marek Lewandowski