# pri-parser

> Parse PRI files using makepri.exe

Latest version **1.0.1** (published 2015-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install pri-parser
pnpm add pri-parser
yarn add pri-parser
bun add pri-parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-08-10 |
| First published | 2015-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Tommy Irish |
| Maintainers | tirish |
| Keywords | pri, resources |

## Links

- npm: https://www.npmjs.com/package/pri-parser
- Repository: https://github.com/tirish/pri-parser
- Issues: https://github.com/tirish/pri-parser/issues
- npm.io page: https://npm.io/package/pri-parser

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.10

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-08-10
- 1.0.0 — 2015-08-10

## README

# pri-parser
Parse PRI files using `makepri.exe`

Wrapper around `makepri.exe` for decompiling `.PRI` files, then parse resulting `.xml` file into useful JSON object.
`makepri.exe` can be downloaded by getting the [SDK](https://msdn.microsoft.com/en-us/windows/hardware/gg454513.aspx). After installing the SDK, the parser should be able to find `makepri.exe` in its default location.

## Usage

```
npm i pri-parser
```

##### `pri.parse(filePath[,config],callback)`

`config`: All properties are Optional.
- `makePriPath`: Absolute path to `makepri.exe`.  If not provided, will attempt to find it.
- `windowsVersion`: Used to select the appropriate version of `makepri.exe` when attempting to find it.
- `makePriArch`: Used to select the appropriate version of `makepri.exe` when attempting to find it.
- `xmlFileName`: Name of file for resulting XML file created by `makepri.exe`. Will be located in `./tmp`.
- `xmlFilePath`: Absolute path of file for resulting XML file created by `makepri.exe`. Overrides `xmlFileName`.
- `keepXml`: If truthy, the resulting XML will not be deleted after parsing is complete.
- `verbose`: If truthy, more info will get logged to console.
- `uriOnly`: If truthy, will return an Array of object containing resource name, uri and values. If falsy, will return object that looks more like the resulting XML file.


## Example

```javascript
var pri = require('pri-parser');

var filePath = 'full/path/to/file.pri';

var config = {
    uriOnly: true
};

pri.parse(filePath,config, function(data){
  console.log(JSON.stringify(data,null,2));
});

```

---
_Source: https://npm.io/package/pri-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
