# metalsmith-xmp-reader

> A small lib to read xmp metadata in jpg files using xmp-reader.

Latest version **1.0.0** (published 2019-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install metalsmith-xmp-reader
pnpm add metalsmith-xmp-reader
yarn add metalsmith-xmp-reader
bun add metalsmith-xmp-reader
```

## 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.0 |
| Published | 2019-05-15 |
| First published | 2019-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | S Daron |
| Maintainers | simeketje |

## Links

- npm: https://www.npmjs.com/package/metalsmith-xmp-reader
- Repository: https://github.com/SDaron/metalsmith-xmp-reader
- Homepage: https://github.com/SDaron/metalsmith-xmp-reader#readme
- Issues: https://github.com/SDaron/metalsmith-xmp-reader/issues
- npm.io page: https://npm.io/package/metalsmith-xmp-reader

## Dependencies (2)

- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [xmp-reader](https://npm.io/package/xmp-reader.md) ^0.0.3

## Recent versions

- 1.0.0 (latest) — 2019-05-15

## README

# metalsmith-xmp-reader 
This is a metalsmith integration for xmp-reader.

Extracts some commonly used XMP/RDF metadata tags from JPEG files.
Does not pretend to be a complete metadata management tool, but allows you to extract some information other EXIF-management tools on NPM fail to retrieve.

## Usage

To install the module add it to your project's ``package.json`` dependencies or install manually running:
```
npm install metalsmith-xmp-reader
```

Then pull it in your code:
```javascript
const Metalsmith = require('metalsmith')
const xmpReader = require('metalsmith-xmp-reader')
Metalsmith(__dirname)
  .use(
    xmpReader({
      pattern: '**/*.+(jpeg|jpg)',
      property: 'xmp'
    })
  )
  .build((err) => {
    if (err) return console.error(err)
    console.log('Build successfully finished! It is 🥙 time!')
  })
```

This will add a xmp field to your jpg files. Output will look something like that, depending on your metadata:
```javascript
{
	"raw": {
		"MicrosoftPhoto:Rating": "50",
		"dc:title": "Title",
		"dc:description": "Description",
		"dc:creator": "Creator",
		"Iptc4xmpCore:Location": "Location",
		"MicrosoftPhoto:LastKeywordXMP": ["tag1", "tag2"],
		"MicrosoftPhoto:LastKeywordIPTC": ["tag1", "tag2"],
		"xmp:Rating": "3"
	},
	"rating": 3,
	"title": "Title",
	"description": "Location",
	"creator": "Creator",
	"location": "Bruxelles",
	"keywords": ["tag1", "tag2"]
}
```
``raw`` property contains vendor-specific tag names.

## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)

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