Chris911 / imgurr

Command line utility for Imgur in ruby
MIT License
62 stars 7 forks source link

undocumented dependency on xclip #12

Open crowell opened 8 years ago

crowell commented 8 years ago
/home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/lib/imgurr/platform.rb:78:in `popen': No such file or directory - xclip (Errno::ENOENT)
        from /home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/lib/imgurr/platform.rb:78:in `copy'
        from /home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/lib/imgurr/command.rb:135:in `upload'
        from /home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/lib/imgurr/command.rb:102:in `delegate'
        from /home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/lib/imgurr/command.rb:27:in `execute'
        from /home/jeff/.rvm/gems/ruby-2.2.1/gems/imgurr-1.0.0/bin/imgurr:8:in `<top (required)>'
        from /home/jeff/.rvm/gems/ruby-2.2.1/bin/imgurr:23:in `load'
        from /home/jeff/.rvm/gems/ruby-2.2.1/bin/imgurr:23:in `<main>'
        from /home/jeff/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
        from /home/jeff/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

it would be nice to just not copy to clipboard if xclip doesn't exist

Chris911 commented 8 years ago

Agreed. I'll see if I can implement this.

Chris911 commented 8 years ago

@crowell added a quick fix for this. Let me know if you have any comments in the PR (#14).

crowell commented 8 years ago

There is a gem called clipboard who can handle this https://rubygems.org/gems/clipboard/versions/1.0.6 On Apr 3, 2016 2:08 PM, "Christophe Naud-Dulude" notifications@github.com wrote:

@crowell https://github.com/crowell added a quick fix for this. Let me know if you have any comments in the PR (#14 https://github.com/Chris911/imgurr/pull/14).

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/Chris911/imgurr/issues/12#issuecomment-205023485

Chris911 commented 8 years ago

I'll have to take a look at how it handles failures. If it throws the fix is probably the same.

kristopolous commented 8 years ago

I'd vote for removing this feature entirely. It's easy enough for the user to do

myupload.sh:
#!/bin/sh
imgurr upload $1 | xclip

What would probably be more useful would be to just output the raw url - that enables the user to do whatever they want with it: log it to a file, put it in the clipboard, etc.

This makes the tool more powerful, more generic, and makes you have less work and hassle.