Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon/screenshot: Support uploading to web services #308

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

joebonrichie
Copy link
Contributor

@joebonrichie joebonrichie commented Feb 18, 2023

Resolves #281.

Description

Based on cybre's screenshot applet but ported to libsoup3.

Supported providers

  • Imgur (with clientid + api key needed)
  • 0x0.st
  • tmpfiles.org
  • tempfiles.ninja

W.I.P image: https://i.imgur.com/myFzsHw.png

TODO:

  • Provide own version of emblem-shared-symbolic instead of relying on the icon-theme?
  • async upload support to prevent blocking the UI
  • Cloud-upload.svg is a placeholder, use save-shot-symbolic.svg instead but rotate it 180degrees.
  • Remove ImageBin support has it's been down for several weeks at this point
  • Support https://tmpfiles.org/api
  • Support https://tempfiles.ninja/api
  • Stop tempfiles.ninja url result from overflowing the LinkButton label

FEEDBACK WANTED:

  • Should we bother converted to a slightly compressed jpeg file before uploading?
  • Should we bother supporting imgur? Either Budgie provides it's own clientid and api key for all downstreams to use and risk hitting the API limits. Or, encourage downstreams to create and provide their own Imgur API key at build time

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

@EbonJaeger EbonJaeger added the enhancement New feature or request label Feb 18, 2023
@joebonrichie joebonrichie force-pushed the screenshot-upload branch 3 times, most recently from 841e150 to 2d9f9c9 Compare February 20, 2023 21:45
@JoshStrobl
Copy link
Member

So uhhh... how's it going @joebonrichie

Resolves BuddiesOfBudgie#281.

Initially support imgur, imagebin and 0x0. Based on cybre's
screen shotshot applet but ported to libsoup3.
Previously we were using the cloud upload svg from breeze.
Service has been down for several weeks, unreliable
meson: Lower libsoup3 requirement from 3.2.0 -> 3.0.7 for CI
Switch from using `send_and_read` to `send_and_read_async` and
stick it in a loop.

This unblocks the UI whilst a screenshot is uploading.
- Make methods all non-static
- Reuse provider strings more effectively
- Prevent unneeded soup and json parser reinitialization
@joebonrichie
Copy link
Contributor Author

What do you want done with imgur support? Comment it out, nuke it or hook up the apikey stuff needed for it to meson options?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Upload feature for new Screenshot application
3 participants