An open API service indexing awesome lists of open source software.

https://github.com/artdecocode/appshot

Records Gifs Of Selected App Window.
https://github.com/artdecocode/appshot

gif node-js

Last synced: 7 months ago
JSON representation

Records Gifs Of Selected App Window.

Awesome Lists containing this project

README

          

# appshot

[![npm version](https://badge.fury.io/js/appshot.svg)](https://npmjs.org/package/appshot)
[![Build Status](https://travis-ci.org/artdecocode/appshot.svg?branch=master)](https://travis-ci.org/artdecocode/appshot)

```
yarn add global appshot

# or
npm i -g appshot
```

A CLI tool to record GIFs of apps on MacOS.

| The result of the recording:
![appshot output](doc/appshot-res.gif) |
| ---------------------------------------------------------------------- |

Click to View: apphost -a Code -t appshot


Alt: How the recording looks.

## Table Of Contents

* [apphost -a Code -t appshot](#apphost--a-code--t-appshot)
- [Table Of Contents](#table-of-contents)
- [ImageMagic convert](#imagemagic-convert)
- [CLI](#cli)
* [List Windows: `--list`, `-l`](#list-windows---list--l)
* [apphost -l](#apphost--l)
* [`--app`, `-a`](#--app--a)
* [`--title`, `-t`](#--title--t)
* [`--wait`, `-w`](#--wait--w)
* [`--file`, `-f`](#--file--f)
* [`--delay`, `-d`](#--delay--d)
* [`--resize`, `-z`](#--resize--z)
* [`--colors`, `-c`](#--colors--c)
* [`--dir`, `-D`](#--dir--d)
* [`--gifsicle`, `-g`](#--gifsicle--g)
* [`--max`, `-m`](#--max--m)
* [`--chopTop`, `-T`: Chop Top](#--choptop--t-chop-top)
- [Copyright](#copyright)

## ImageMagic convert

The `convert` utility from ImageMagic library should be installed to allow saving optimized GIFs.

```sh
brew install imagemagic
```

Otherwise, un-optimized records can be taken with `-g` flag.

## CLI

After installing globally, the program can be run from the command line. The app name and the window title should be passed with the `-a` and `-t` arguments to start the recording of the required window.

```
appshot -a Application -t part_of_window_title
```

Otherwise, just part of the window title can be passed as the command when only one window with such title exists.

```
appshot README.md
```

If more that one window is found, the recording won't start.

### List Windows: `--list`, `-l`

Only list the open windows without capturing a gif. Display the window's ID, App, title and PID.

```sh
appshot -l
```
```
┌────────┬──────────────────┬────────────────────────────────────────┬────────┐
│ winid │ app │ title │ pid │
│ 84 │ Flux │ Item-0 │ 912 │
│ 61 │ SystemUIServer │ AppleClockExtra │ 346 │
│ 49 │ SystemUIServer │ AirPortExtra │ 346 │
│ 92 │ Tunnelblick │ Item-0 │ 1058 │
│ 157 │ AAM Updates Not… │ Item-0 │ 2771 │
│ 86 │ Evernote Helper │ Item-0 │ 911 │
│ 35 │ SystemUIServer │ AppleTimeMachineExtra │ 346 │
│ 39 │ SystemUIServer │ AppleBluetoothExtra │ 346 │
│ 43 │ SystemUIServer │ AppleVolumeExtra │ 346 │
│ 57 │ SystemUIServer │ BatteryExtra │ 346 │
│ 53 │ SystemUIServer │ AppleTextInputExtra │ 346 │
│ 65 │ SystemUIServer │ AppleUser │ 346 │
│ 30 │ Spotlight │ Item-0 │ 371 │
│ 21 │ SystemUIServer │ NotificationCenter │ 346 │
│ 3 │ Window Server │ Menubar │ 209 │
│ 151 │ Code │ index.md — appshot │ 333 │
│ 99 │ Google Chrome │ │ 337 │
│ 98 │ Google Chrome │ artdecocode/appshot: Records Gifs Of … │ 337 │
│ 272 │ Terminal │ doc — -bash — 131×21 │ 339 │
│ 76 │ Sketch │ Welcome to Sketch │ 340 │
│ 4 │ Window Server │ Backstop Menubar │ 209 │
│ 33 │ Finder │ │ 347 │
│ 14 │ Dock │ Desktop Picture - DefaultDesktop.heic │ 345 │
│ 2 │ Window Server │ Desktop │ 209 │
└────────┴──────────────────┴────────────────────────────────────────┴────────┘
```

Click to View: apphost -l


Alt: Displaying the list information once.

### `--app`, `-a`

Filter by the name of the application.

### `--title`, `-t`

Filter by the title of the window. Same as passing the title as the first argument.

### `--wait`, `-w`

Delay in seconds before the recording starts.

### `--file`, `-f`

Path to the file. If none specified, a prompt will be displayed.

### `--delay`, `-d`

How often to take screenshots. Defaults to 1 second.

### `--resize`, `-z`

Resize to this width, keeping height proportionate.

### `--colors`, `-c`

How many colors to use in the output gif.

### `--dir`, `-D`

Directory in which to save the gif.

### `--gifsicle`, `-g`

Save in un-optimized gif format. This can be used when `imagemagic` is not installed, however not recommended as the image size is not optimal.

### `--max`, `-m`

Capture this number of frames at maximum and stop recording.

### `--chopTop`, `-T`: Chop Top

How many pixels to take off top of each image. Pass `23` value (on non-retina displays) to remove the window headers, which can change title or status and lead to de-optimisation.

## Copyright

(c) [Art Deco][1] 2018

[1]: https://artdeco.bz