Peek: Feature request: Imgur upload support

Created on 22 Mar 2018  路  28Comments  路  Source: phw/peek

Peek works for me but uploading gif manually is still a pain.

enhancement help wanted

Most helpful comment

@phw something like this?
sharing

All 28 comments

What would be the best to implement this? Have an check option for imgur upload, when you are done recording open a dialog box asking whether you wish to upload? or just skip the dialog and get straight to the upload?

I might be interested in working on this.. what are your opinions on the best way to go about doing this?

Both :stuck_out_tongue_closed_eyes:
dialog box + the option to make it seamless ("don't ask me again" checkbox)
What would be awesome but perhaps overcomplicated:
proxy duckduckgo com
Just like in xfce4-screenshooter a dialog box that pops up after the screenshot is completed, allows different option, especially the option to open the screenshot in a certain application like gimp, inkscape etc...
In the context of Peek, folks could choose to open the animated gif or mp4 with kdenlive for example...

I like it but it does seem to a little too much.. what do you think @phw ?

I am not sure about this. Maybe do it like this:

  1. Have a sharing dialog shown after saving, for now with only the options:

    • Open in file manager

    • Upload to Imgur

    • Maybe the "open with" as shown above, but we could do this in a separate issue

  2. Remove the "Show file manager after saving" option, and replace it with "Show sharing dialog after saving"

Not sure about having a default option. When this bypasses the dialog I don't know how people escape from this again. I would exclude this for now.

For the dialog itself I would keep it very simple and easy to understand. I like the selection boxes Gnome Tweak Tools uses for some choices, they provide some extra information:

grafik

I am not sure how Imgur works, but I assume you need to authenticate? So we need some functionality for this as well.

Ok I like that, I have a client id for imgur for anonymous uploads.. now just to figure out how to implement it in vala.. maybe libsoup or libcurl for the https request.

Probably going to need some help with this.. should be fun :)

@zero-master thanks I will look into this.

If this will get implemented you only have to wait for the following questions : can it upload to facebook? can it upload to instagram?

The "upload to site X" features rely on a third party site and as a dev I'm not a fan of that. A better way is have another neglectible program that uploads a folder or individual images to any media site.

This is just my 2 cents. Also if I see some program use a third party I don't trust I stop using the program.

@a1p4ca xfce-screenshooter (https://github.com/phw/peek/issues/298#issuecomment-376458814) bundled in with xfce has imgur and ZimageZ as options. People still use that. So I don't agree with your premise.

A more general approach would be https://github.com/phw/peek/issues/230 , actually handing off the issue to other tools. I mean part of this is why I added the "Show in file manager" option in the first place: It easily allows you to work with the file with whatever tool you can use to open it.

But being able to upload images is a often requested feature, so I don't see it as a mistake to implement it here. Also for 2 or 3 services if they are popular enough. We can still refactor the code and move it into a separate tool later on.

@A1rPun: You don't have to use the feature, I don't see why you should stop using the rest of the tool just because Imgur upload gets implemented.

@phw Fair enough, code can be altered and be updated when said services go down (if ever).

I never stated that I don't trust Imgur, I just wanted to protect this great tool for more issue requests for other different services which I don't trust.

I never stated that I don't trust Imgur, I just wanted to protect this great tool for more issue requests for other different services which I don't trust.

Definitely. I think you can be sure this won't get too much. But we need to start with some sharing features, I tried ignoring this and similar feature requests long enough :) And Imgur is a) popular enough and b) the API looks simple enough to give this a go.

Alright good luck with the implementation :)! Imgur is indeed a popular site, I personally use Giphy but can't have it all :stuck_out_tongue:

If you want this tool to be popular, you'll have to support use case which enables easy sharing on at least one of the top website.

What's wrong with imgur?

I always had this tool installed but I never looked for it because I knew, I'll have to manually take the gif and upload it somewhere before I send the URL to my friend. That's too much effort which shouldn't be needed in 2018.

@A1rPun I see were you are coming from, but I am not using any of their code or libraries it is a simple https POST request..

I also checked the Giphy api.. unfortunately there is no upload api available at the moment they said there are working on it https://github.com/Giphy/GiphyAPI/issues/157

Good news I have a working example now just to implement it! Soon we shall be able to upload to imgur!

@phw something like this?
sharing

@gort818 Yes, something like this as selection. When putting it into the final dalog I would just put some spacing around. And a checkmark like in the following screen would help:

grafik

For the buttons I would suggest adding a headerbar with Ok and Cancel button.

@phw any idea how to get the check-marks on the right side? I played with it quite a bit couldn't figure it out with adding a button and label for the check-mark. I wonder if the check-mark moves according the theme.

@gort818 No, not directly. But I would probably look at how Gnome Tweaks does it and copy that. The screenshot above is from there.

@phw thanks for the tip I figured it out!

imgur

Ok getting somewhere

Ok I got the basic functionality working if any of you want to give a test drive, atm peek returns the imgur link in the terminal.
https://github.com/gort818/peek/tree/imgur

Thanks a lot for this! I will definitely give this a test drive in the next days!

Awesome.. a lot more changes made today :)

I have updated my Imgur branch recently if anyone wants to test it out,
https://github.com/gort818/peek/tree/imgur

Any update on getting this feature added? =D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grimmer-std picture grimmer-std  路  6Comments

Jokero picture Jokero  路  4Comments

StephenFluin picture StephenFluin  路  4Comments

leoherzog picture leoherzog  路  7Comments

ronjouch picture ronjouch  路  6Comments