summaryrefslogtreecommitdiff
path: root/plugins/cloudapp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cloudapp')
-rw-r--r--plugins/cloudapp/README.md26
-rw-r--r--plugins/cloudapp/cloudapp.plugin.zsh6
-rwxr-xr-xplugins/cloudapp/cloudapp.rb60
3 files changed, 30 insertions, 62 deletions
diff --git a/plugins/cloudapp/README.md b/plugins/cloudapp/README.md
new file mode 100644
index 000000000..ef304edc2
--- /dev/null
+++ b/plugins/cloudapp/README.md
@@ -0,0 +1,26 @@
+# CloudApp plugin
+
+## The CloudApp API is deprecated, so the plugin will be removed shortly
+
+[CloudApp](https://www.getcloudapp.com) brings screen recording, screenshots, and GIF creation to the cloud, in an easy-to-use enterprise-level app. The CloudApp plugin allows you to upload a file to your CloadApp account from the command line.
+
+To use it, add `cloudapp` to the plugins array of your `~/.zshrc` file:
+
+```zsh
+plugins=(... cloudapp)
+```
+
+## Requirements
+
+1. [Aaron Russell's `cloudapp_api` gem](https://github.com/aaronrussell/cloudapp_api#installation)
+
+2. That you set your CloudApp credentials in `~/.cloudapp` as a simple text file like below:
+ ```
+ email
+ password
+ ```
+
+## Usage
+
+- `cloudapp <filename>`: uploads `<filename>` to your CloudApp account, and if you're using
+ macOS, copies the URL to your clipboard.
diff --git a/plugins/cloudapp/cloudapp.plugin.zsh b/plugins/cloudapp/cloudapp.plugin.zsh
index 99252f690..a4d92a080 100644
--- a/plugins/cloudapp/cloudapp.plugin.zsh
+++ b/plugins/cloudapp/cloudapp.plugin.zsh
@@ -1,2 +1,4 @@
-#!/bin/zsh
-alias cloudapp=$ZSH/plugins/cloudapp/cloudapp.rb
+print -Pn "%F{yellow}"
+print "[oh-my-zsh] The CloudApp API no longer works, so the cloudapp plugin will"
+print "[oh-my-zsh] be removed shortly. Please remove it from your plugins list."
+print -Pn "%f"
diff --git a/plugins/cloudapp/cloudapp.rb b/plugins/cloudapp/cloudapp.rb
deleted file mode 100755
index a11cfdb32..000000000
--- a/plugins/cloudapp/cloudapp.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-#
-# cloudapp
-# Zach Holman / @holman
-#
-# Uploads a file from the command line to CloudApp, drops it into your
-# clipboard (on a Mac, at least).
-#
-# Example:
-#
-# cloudapp drunk-blake.png
-#
-# This requires Aaron Russell's cloudapp_api gem:
-#
-# gem install cloudapp_api
-#
-# Requires you set your CloudApp credentials in ~/.cloudapp as a simple file of:
-#
-# email
-# password
-
-require 'rubygems'
-begin
- require 'cloudapp_api'
-rescue LoadError
- puts "You need to install cloudapp_api: gem install cloudapp_api"
- exit!(1)
-end
-
-config_file = "#{ENV['HOME']}/.cloudapp"
-unless File.exist?(config_file)
- puts "You need to type your email and password (one per line) into "+
- "`~/.cloudapp`"
- exit!(1)
-end
-
-email,password = File.read(config_file).split("\n")
-
-class HTTParty::Response
- # Apparently HTTPOK.ok? IS NOT OKAY WTFFFFFFFFFFUUUUUUUUUUUUUU
- # LETS MONKEY PATCH IT I FEEL OKAY ABOUT IT
- def ok? ; true end
-end
-
-if ARGV[0].nil?
- puts "You need to specify a file to upload."
- exit!(1)
-end
-
-CloudApp.authenticate(email,password)
-url = CloudApp::Item.create(:upload, {:file => ARGV[0]}).url
-
-# Say it for good measure.
-puts "Uploaded to #{url}."
-
-# Get the embed link.
-url = "#{url}/#{ARGV[0].split('/').last}"
-
-# Copy it to your (Mac's) clipboard.
-`echo '#{url}' | tr -d "\n" | pbcopy`