GithubHelp home page GithubHelp logo

Comments (5)

mattgen88 avatar mattgen88 commented on June 3, 2024

This would be useful for arbitrary uploading, a use case I need.

from gnome-shell-screenshot.

isaaclw avatar isaaclw commented on June 3, 2024

This would at least provide a solution for #64

from gnome-shell-screenshot.

OttoAllmendinger avatar OttoAllmendinger commented on June 3, 2024

Almost 4 years later :) b722ff6

from gnome-shell-screenshot.

OttoAllmendinger avatar OttoAllmendinger commented on June 3, 2024

image

from gnome-shell-screenshot.

JohnPlayerSpecial avatar JohnPlayerSpecial commented on June 3, 2024

I am using it to upload the screenshot to telegram
curl -F photo=@{f} https://api.telegram.org/bot<MY_BOT_TOKEN>/sendPhoto?chat_id=<MY_CHAT_ID>

with success.

However since qrcode have become more popular and you often see them around I had an idea.
I want to use something like

zenity --info --text `zbarimg -q {f}

zbarimg is a tool to decode qrcodes, while zenity is a basic gui to display the message (from zbarimg)

The problem is that I am not able to chain the two commands together.
I want to both upload to telegram (I can do that as of now) and show the decoded qrcode string.
(if there is no qrcode in the screenshot zbarimg returns nothing)

I said ok, I can't do this by chaining the two commands with a ';' in the gnome screenshot "commands" settings' tab, so let's make a sh script.

FILENAME=$1
curl -F photo=@$FILENAME https://api.telegram.org/bot<TOKEN>/sendPhoto?chat_id=<chat_id>
zenity --info --text `zbarimg -q $FILENAME`  

and I am calling with
sh /home/ub20/screenshot.sh {f}

however this does not work, I get error exitcode=65280.

The path I save the screenshot to has no spaces in it, I mean folders and subfolders of screenshot destination path has no spaces
Any idea?

from gnome-shell-screenshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.