# get-adobe-generator

> A helper module which allows you to receive a Photoshop Generator instance

Latest version **1.0.0** (published 2015-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-adobe-generator
pnpm add get-adobe-generator
yarn add get-adobe-generator
bun add get-adobe-generator
```

## 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 | 2015-07-27 |
| First published | 2015-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Mikko Haapoja |
| Maintainers | mikkoh |
| Keywords | photoshop,generator,helper,utility,wrapper |

## Links

- npm: https://www.npmjs.com/package/get-adobe-generator
- Repository: https://github.com/jam3/get-adobe-generator
- Issues: https://github.com/jam3/get-adobe-generator/issues
- npm.io page: https://npm.io/package/get-adobe-generator

## Dependencies (1)

- [generator-core](https://npm.io/package/generator-core.md) ^3.2.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-07-27

## README

# get-adobe-generator

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

This module gives you a straightforward way to access Adobe Generator's `generator` object to create tools outside of Photoshop. Basically it's an easier way to interact with Photoshop through Node.

The following example will work if you have a newish vesion of photoshop and you've enabled generators:
```
Open Photoshop, go to 

Photoshop -> 
Preferences -> 
Plug-ins 

and click Enable Remote Connections and set password to “password” string.
```

## Example
```javascript
var getAdobeGenerator = require('get-adobe-generator');

var generator = getAdobeGenerator();

generator.getOpenDocumentIDs()
.then(function(ids) {

  return generator.getDocumentInfo(ids[ 0 ]);
})
.then(function(info) {

  console.log('there are', info.layers.length, 'layers');

  return generator.getPixmap(info.id, info.layers[0].id, {});
})
.then(function(pixmap) {

  console.log('got the pixmap');
});

generator.onPhotoshopEvent('toolChanged', function(tool) {
  console.log('toolChanged', tool);
});

generator.onPhotoshopEvent('currentDocumentChanged', function(info) {
  console.log('currentDocumentChanged', info);
});

generator.onPhotoshopEvent('imageChanged', function(info) {
  console.log('imageChanged', info);
});

generator.onPhotoshopEvent('close', function() { 
  console.log('photoshop closed');
});
```

## Usage

[![NPM](https://nodei.co/npm/get-adobe-generator.png)](https://www.npmjs.com/package/get-adobe-generator)

#### `var generator = require('get-adobe-generator')([options]);`

`generator` is a [Adobes Generator instance](https://github.com/adobe-photoshop/generator-core/blob/master/lib/generator.js). 

For more info and documentation on the generator checkout the generator code at: 
https://github.com/adobe-photoshop/generator-core/blob/master/lib/generator.js

## License

MIT, see [LICENSE.md](http://github.com/mikkoh/get-adobe-generator/blob/master/LICENSE.md) for details.

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