├── .gitignore ├── .travis.yml ├── index.js ├── README.md ├── package.json └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | before_install: 3 | - sudo apt-get update -qq 4 | - sudo apt-get install -y libavahi-compat-libdnssd-dev 5 | node_js: 6 | - '0.12' 7 | - '0.10' 8 | - 'iojs' 9 | matrix: 10 | allow_failures: 11 | - node_js: iojs 12 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict' 3 | 4 | var airplay = require('airplay-photos')('aircat') 5 | 6 | airplay.on('photo', function (req) { 7 | req.pipe(process.stdout) 8 | req.on('end', function () { 9 | airplay.unref() 10 | process.exit() // the mDNS servers are holding up the event loop - for now just force exit 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aircat 2 | 3 | Transfer photos from your iDevice to your computer in the terminal. 4 | 5 | [![Build status](https://travis-ci.org/watson/aircat.svg?branch=master)](https://travis-ci.org/watson/aircat) 6 | [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) 7 | 8 | ## Installation 9 | 10 | ``` 11 | npm install -g aircat 12 | ``` 13 | 14 | ## Usage 15 | 16 | 1. Start aircat and pipe the output to a new file: 17 | ``` 18 | aircat > my-photo.jpg 19 | ``` 20 | 21 | 1. In the Photos app, find the photo you'd like to transfer and click 22 | the share icon (your phone should be on the same network as the 23 | computer) 24 | 25 | 1. Select AirPlay and choose aircat 26 | 27 | The picture should now be written to `my-photo.jpg`. Aircat will exit 28 | when finished. 29 | 30 | ## License 31 | 32 | MIT 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aircat", 3 | "version": "1.0.2", 4 | "description": "AirPlay cat tool", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/watson/aircat.git" 9 | }, 10 | "dependencies": { 11 | "airplay-photos": "^1.0.1" 12 | }, 13 | "devDependencies": { 14 | "standard": "^5.2.1" 15 | }, 16 | "scripts": { 17 | "test": "standard" 18 | }, 19 | "bin": { 20 | "aircat": "./index.js" 21 | }, 22 | "keywords": [ 23 | "airplay", 24 | "cat", 25 | "cli", 26 | "photo", 27 | "photos", 28 | "transfer", 29 | "utility" 30 | ], 31 | "author": "Thomas Watson Steen (https://twitter.com/wa7son)", 32 | "license": "MIT", 33 | "preferGlobal": true, 34 | "bugs": { 35 | "url": "https://github.com/watson/aircat/issues" 36 | }, 37 | "homepage": "https://github.com/watson/aircat#readme", 38 | "coordinates": [ 39 | 56.1460465, 40 | 10.202726 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Thomas Watson Steen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------