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

Support for export actions from CLI #1956

Closed
veracioux opened this issue Oct 9, 2021 · 4 comments · Fixed by #1970
Closed

Support for export actions from CLI #1956

veracioux opened this issue Oct 9, 2021 · 4 comments · Fixed by #1970
Assignees
Labels
CLI CLI specific Enhancement Feature requests and code enhancements

Comments

@veracioux
Copy link
Contributor

veracioux commented Oct 9, 2021

I would like to complement the existing CLI options -p, -c, -r, -g to flameshot gui/screen/full with the following options:

  • --pin, -P; When the screenshot is accepted, pin screenshot. #1834
  • --upload, -u; When accepted, upload to imgur
  • --accept-on-select --done-on-select, -s; Accept the capture as soon as a selection is made (on mouse release). #642

To understand what I mean by accept, please look at #1955.

Note: Maybe the pin option should not be available in flameshot full. It could have weird behavior. Thoughts?

Please let me know what you think about these options. Do you have additional suggestions?

Another thought I'd like to drop here:
We could merge --path and --raw into a single --output/-o option. When used as --output - or -o - it should behave exactly as --raw. Otherwise it should behave the same as --path. This is more in line with the usual behavior of CLI programs. And it would allow --pin to be shortened to -p.

@mmahmoudian
Copy link
Member

@veracioux I think there are two issues with the pin:

  1. We use -p for path and now using -P would be very confusing. (Perhaps -i?)
  2. The pin only make sense for flameshot gui and not the flameshot screen or flameshot full

Also, imho the capture on mouse release would only make sense for flameshot gui too.

About the --output -, I wonder if at the moment one can chain --raw --path and get the screenshot saved and sent to stdout simultaneously. If it is possible, I think the --output would break an existing "feature".

@mmahmoudian mmahmoudian added Enhancement Feature requests and code enhancements CLI CLI specific labels Oct 10, 2021
@veracioux
Copy link
Contributor Author

@mmahmoudian

  1. We use -p for path and now using -P would be very confusing. (Perhaps -i?)

I'd prefer to reserve -i for specifying an input image if we decide to implement that feature in the future (there have been some issues discussing this). I'd like to leave out a short option for --pin for the time being.

  1. The pin only make sense for flameshot gui and not the flameshot screen or flameshot full

I think flameshot screen --pin could be useful. For example, you can take a screenshot of one screen and put it on another screen. Maybe you want to compare something or just fool someone about the contents of your other screen.

Also, imho the capture on mouse release would only make sense for flameshot gui too.

Of course, silly me :)

About the --output -, I wonder if at the moment one can chain --raw --path and get the screenshot saved and sent to stdout simultaneously. If it is possible, I think the --output would break an existing "feature".

Yeah, you can use both --raw and --path at the same time. You have changed my mind about this.

I will change --done-on-select to --accept-on-select to prevent confusion.

@mmahmoudian
Copy link
Member

I'd prefer to reserve -i for specifying an input image

Very good point

I'd like to leave out a short option for --pin for the time being.

I agree with your judgement call. Let's proceed and then later we can add it we felt the need later on.

I think flameshot screen --pin could be useful.

Fair enough

or just fool someone about the contents of your other screen.

Can't it be done by piping the raw into feh or sxiv? I should try that and see if it works 😜

I will change --done-on-select to --accept-on-select to prevent confusion.

👍🏼

@veracioux
Copy link
Contributor Author

veracioux commented Oct 11, 2021

Can't it be done by piping the raw into feh or sxiv?

Of course it can (flameshot screen -r | feh -). But it is not always positioned exactly where the screen is, unlike the --pin option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI CLI specific Enhancement Feature requests and code enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants