Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Automating imgur-screenshot #87

Closed
a-mstv opened this issue Aug 1, 2016 · 6 comments
Closed

Automating imgur-screenshot #87

a-mstv opened this issue Aug 1, 2016 · 6 comments

Comments

@a-mstv
Copy link

a-mstv commented Aug 1, 2016

Hey there, I wanted to know if it's possible to make the program do the following. I'm new to OS X but I'm learning quickly so just point me in the right direction, if possible:

  1. Press a hotkey to capture an area / fullscreen
  2. Draw lines, add text if necessary, confirm
  3. Have the program upload the captured and edited image to imgur and copy the direct link to buffer

Currently the program in its current state is only executed from the command line, it does not let me edit the image and it opens the direct link to the image (which I don't need).

Ideally I just want to press a hotkey, mark the area, edit if necessary and then paste the link somewhere. No pop-ups except what's needed.

@jomo
Copy link
Owner

jomo commented Aug 1, 2016

  1. You can use a 3rd party tool to bind the script to key. It's also possible to do this native with OS X but requires writing some apple specific files, you'd need to look that up
  2. I think you're looking for the edit config option. You can edit the screenshot with Photoshop, Gimp, or even ImageMagick or whatever you like.
  3. That's what it does anyway :)

@jomo jomo closed this as completed Aug 1, 2016
@a-mstv
Copy link
Author

a-mstv commented Aug 1, 2016

Thank you!

  1. Okay, managed to do that with OS X native Automator (AppleScript).
  2. How do I set what software I want to use for editing?

@a-mstv
Copy link
Author

a-mstv commented Aug 1, 2016

I've tried launching with
imgur-screenshot.sh -i seashore ~/Pictures/%img
but it throws me
file '/Users/.../Pictures/%img' doesn't exist !

Why doesn't it take %img as a variable of the image?

@jomo
Copy link
Owner

jomo commented Aug 1, 2016

You're only passing seashore as an argument to the -i flag. Try quoting the whole thing, so the argument doesn't end at the space.

@a-mstv
Copy link
Author

a-mstv commented Aug 3, 2016

Thanks @jomo for getting back to me with a reply, I've managed to do what I wanted. I wrote two native OS X AppleScripts - one just captures the selection, instantly uploads it to imgur and copies the link to the buffer and the other one does the same with an image edit step. I've also bound them to hotkeys natively. Awesome!

Perhaps you want me to share them so that you can include them in your readme for people looking to automate this on OS X? I had an application that basically did what I coded on Windows and when I moved to OS X I was looking all over the place for something like this.

@jomo
Copy link
Owner

jomo commented Aug 3, 2016

I think the wiki would be a good place for these kind of things

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants