├── install.sh ├── ipfs-screen.sh └── README.md /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | srcScript=ipfs-screen.sh 4 | bin=ipfs-screenshot 5 | 6 | # this script is currently brain dead. 7 | # it merely tries two locations. 8 | # in the future maybe use value of $PATH. 9 | 10 | binpath=/usr/local/bin 11 | if [ -d "$binpath" ]; then 12 | cp "$srcScript" "$binpath/$bin" 13 | echo "installed $binpath/$bin" 14 | exit 0 15 | fi 16 | 17 | binpath=/usr/bin 18 | if [ -d "$binpath" ]; then 19 | cp "$srcScript" "$binpath/$bin" 20 | echo "installed $binpath/$bin" 21 | exit 0 22 | fi 23 | 24 | -------------------------------------------------------------------------------- /ipfs-screen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | mkdir -p ~/.ipfs-screen/ 3 | echo "testing" >> ~/.ipfs-screen/ipfs-add.log 4 | file=$(date +"%Y-%m-%d-%T-screenshot") 5 | clipboard_command="xclip -selection clipboard" 6 | 7 | platform=`uname` 8 | if [[ "$platform" == "Darwin" ]] 9 | then 10 | screencapture -t jpg -i ~/.ipfs-screen/$file 11 | clipboard_command="pbcopy" 12 | else 13 | gnome-screenshot -a -f ~/.ipfs-screen/$file 14 | fi 15 | 16 | hash_log=$(ipfs add ~/.ipfs-screen/$file) 17 | 18 | echo $hash_log >> ~/.ipfs-screen/ipfs-add.log 19 | 20 | hash=$(echo $hash_log | awk '{ print $2; }') 21 | 22 | echo -n "https://ipfs.io/ipfs/$hash" | $clipboard_command 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![IPFS](https://ipfs.io/ipfs/QmZkNPfhoZnvHfEvaeMk6FFXUbZXbNGqEt4VH57QA7Yj4J) 2 | # IPFS screenshot url 3 | 4 | [![Join the chat at https://gitter.im/uptownhr/ipfs-screenshot](https://badges.gitter.im/uptownhr/ipfs-screenshot.svg)](https://gitter.im/uptownhr/ipfs-screenshot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 5 | 6 | Like cloudapp but using IPFS. If you're asking why IPFS, you should check out ipfs.io. A simple way to think of IPFS is torrents but accessible through HTTP. 7 | 8 | Sample IPFS link: https://ipfs.io/ipfs/QmTf3EquRYzxa4njTRpimp6YEcJJPSUf5pQE9TE54qCa3M 9 | 10 | 11 | # Setup on Ubuntu 12 | Currently no installer so steps need to be taken manually. 13 | 14 | 1. Install [IPFS](https://ipfs.io/docs/install/) 15 | 2. install xclip, `apt-get install xclip` 16 | 3. Clone repository, `git clone git@github.com:uptownhr/ipfs-screenshot` 17 | 4. Start ipfs daemon, `ipfs daemon` 18 | 5. create keyboard shortcut, System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts -> + 19 | - command: /{path-to-ipfs-screen}/ipfs-screen.sh 20 | 21 | # Setup on Mac OS 22 | 23 | 1. Install [IPFS](https://ipfs.io/docs/install/) 24 | 2. Clone repository, `git clone git@github.com:uptownhr/ipfs-screenshot` 25 | 3. Start ipfs daemon, `ipfs daemon` 26 | 27 | 28 | # Use 29 | 1. use keyboard shortcut ie: ctrl + shift + s 30 | 2. Select screen area 31 | 3. Paste, ipfs url to the screenshot will be available for use 32 | 33 | 34 | 35 | # Todo 36 | - [x] Create installer script 37 | - [x] Support for OSX 38 | - [ ] Support for Windows 39 | - [ ] Create Video / Gif Recorder 40 | --------------------------------------------------------------------------------