Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmdartus/snapline
Unleash your screenshots stored in Chrome Devtool timeline files
https://github.com/pmdartus/snapline
Last synced: 9 days ago
JSON representation
Unleash your screenshots stored in Chrome Devtool timeline files
- Host: GitHub
- URL: https://github.com/pmdartus/snapline
- Owner: pmdartus
- License: mit
- Created: 2016-02-18T19:35:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-03-17T16:38:33.000Z (over 8 years ago)
- Last Synced: 2024-10-18T19:01:10.141Z (21 days ago)
- Language: JavaScript
- Homepage: https://github.com/pmdartus/timeline-screenshot
- Size: 7.28 MB
- Stars: 393
- Watchers: 5
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-chrome-devtools - snapline - Converts timeline screenshots to gif. (DevTools tooling and ecosystem / Multimedia)
README
# snapline
[![Circle CI](https://circleci.com/gh/pmdartus/snapline.svg?style=svg)](https://circleci.com/gh/pmdartus/snapline)
> Unleash your screenshots stored in Chrome Devtool timeline files
![demo](demo.gif)
## Features
* Convert timeline to gif
* Extract screenshots save in a timeline into a folder## Install
Before using snapline, please install `imageMagick` and ensure that your version of node is greater than `4.0`.
```shell
npm install -g snapline
```## CLI usage
```shell
> snapline -hUsage: snapline [options]
Options:
--help Show help [boolean]
-o, --output Output file name [string] [default: "timeline.gif"]
-f, --fps Number of frames per seconds [number] [default: "10"]
```## Node usage
```js
const snapline = require('../src')
const timeline = require('./my-awesome-timeline.json')snapline.toGif(timeline)
.then(gifPath => console.log(`The gif(t) is ready: ${gifPath}!`))
```## API
### `snapline.toGif(timeline[, options])`
* `timeline` - The parsed JSON content of the timeline file
* `options.output` - path of the gif. default: `./timeline.gif`
* `options.fps` - Number of frames per seconds. default: `10`Returns a `Promise` that resolves with the path of the created gif
### `snapline.toImages(timeline[, options])`
* `timeline` - The parsed JSON content of the timeline file
* `options.output` - folder path that will contains the screenshots. default: `./screenshots`
* `options.fps` - Number of frames per seconds. default: `10`Returns a `Promise` that resolves with the path of the path of the created directory
## License
MIT. See `/LICENSE`
## Owner
Pierre-Marie Dartus - [@pmdartus](https://github.com/pmdartus)