! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
add --filename/-F cmdline option to specify the screenshot filename
Status:
RESOLVED: FIXED
Product:
Xfce4-screenshooter
Component:
General

Comments

Description 景文实 2018-01-11 03:12:14 CET
Created attachment 7527 
git patch based on d78eaf34014877388f35940db327081cd9a76dd7

Add --filename or -F cmdline option to specify screenshot filename.It helps script to automatic gen shot files.
Comment 1 Andre Miranda editbugs 2018-01-25 02:32:08 CET
Thanks for providing a patch.
Strange, it doesn't for work for me, isn't it supposed to be used like this?
xfce4-screenshooter -w --filename /home/andre/a.png

Other than that, instead of introducing a new option, I think it's better to extend the -s/--save option to also support files, the logic would be:
- Is it a directory? Open the save dialog.
- The path is not valid, e.g. one directory does not exist? Show a message reporting that to the user.
- Is it a valid path to a png file? Save the file without any confirmation.

Looking forward an updated patch to merge ASAP :)
Comment 2 景文实 2018-01-29 12:10:33 CET
Sorry!I should provide the usage:
xfce4-screenshooter -w -s /home/andre/ --filename a.png
--filename just specify the name of the screenshot file,but not include its directory.

To extend -s option is realy better.I was just thinking about adding the function without changing too much.
Comment 3 Ralph Corderoy 2018-08-13 16:04:57 CEST
Being able to take a screenshot without any dialogue being shown to confirm the filename is why I came here, but the logic for extending -s is flawed.  I wish to create a new PNG, not trample an existing one, nor have to have a PNG already existing.  In effect, I just keep hitting Enter for the suggested filename that ends in seconds and that shouldn't be required.  Then I can script periodic screenshots, etc., for a particular window.
Comment 4 Arthur Jansen 2018-12-28 17:25:33 CET
Created attachment 8204 
Patch for extended save function

I made a patch that allows you to save directly to a file, skipping the save dialog, using the --save option. This does perfectly allow you to script periodic screenshots and such since you can save it to a non-existing file.
Comment 5 Git Bot editbugs 2019-01-05 22:27:24 CET
Arthur Jansen referenced this bugreport in commit 64998063015cf66c6d186feae0ae2d81ff320f69

Extended save function to also take files (Bug #14156)

https://git.xfce.org/apps/xfce4-screenshooter/commit?id=64998063015cf66c6d186feae0ae2d81ff320f69
Comment 6 Andre Miranda editbugs 2019-01-05 22:28:32 CET
Thanks a lot Arthur for the patch, I reviewed it a bit and pushed to master.
Comment 7 Andre Miranda editbugs 2019-01-05 22:38:07 CET
*** Bug 14866 has been marked as a duplicate of this bug. ***
Comment 8 Andre Miranda editbugs 2019-01-05 22:38:56 CET
*** Bug 11144 has been marked as a duplicate of this bug. ***

Bug #14156

Reported by:
景文实
Reported on: 2018-01-11
Last modified on: 2019-01-05
Duplicates (2):
  • 11144 [Feature Request] save the screenshot automatically
  • 14866 Feature Request: Add command-line option to automatically accept default filename for --save option

People

Assignee:
Jérôme Guelfucci
CC List:
5 users

Version

Attachments

Additional information