Advertisement
casual_pleb

Untitled

Sep 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. #!/bin/bash
  2. # Copyright (c) 2016 Phillip Tang <tangphillip@gmail.com>
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a
  5. # copy of this software and associated documentation files (the "Software"),
  6. # to deal in the Software without restriction, including without limitation
  7. # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. # and/or sell copies of the Software, and to permit persons to whom the
  9. # Software is furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included
  12. # in all copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  15. # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. # DEALINGS IN THE SOFTWARE.
  21.  
  22.  
  23. # Based the work of Bart Nagel <bart@tremby.net>
  24. # If you have rate limit issues, get your own key at http://api.imgur.com/
  25. #Default Key, can get rate limit if too many people use script
  26. #CLIENT_ID="9657b96ca0b7f38"
  27.  
  28. #My custom key, no rate limit issues :)
  29. CLIENT_ID="3a6e072f5f1f717"
  30. CLIPBOARD=true
  31.  
  32. clip() {
  33. xsel -bps
  34. }
  35. # function to output usage instructions
  36. function usage {
  37. echo "Usage: $(basename "$0") [filenames]
  38. Upload images to imgur, print their URLs to stdout, and print the delete pages URL to stderr.
  39. If you're on a Mac or have xsel/xclip, copy the images URLs to the clipboard.
  40. If you don't especify any filename, they will be read from standard input." >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement