Just saw this. It looks like there are still colons in the file names. It is pretty clear in the screen shot, you still are getting the colons in the filenames.
Take a Shot! v2.1 - yet another screenshot utility...
Moderator: Forum moderators
- MochiMoppel
- Posts: 1343
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 521 times
Re: Take a Shot! - yet another screenshot utility...
MrDuckGuy wrote: Sun Jan 05, 2025 10:01 pmSo the issue with the file naming shortcuts is with three of the shortcuts that will add colon symbols to the filename.
They are supposed and expected to add colons, and that's what they do.
What exactly is the "issue"? Compatibility with certain file systems?
Re: Take a Shot! - yet another screenshot utility...
MochiMoppel wrote: Tue Jan 07, 2025 10:05 amMrDuckGuy wrote: Sun Jan 05, 2025 10:01 pmSo the issue with the file naming shortcuts is with three of the shortcuts that will add colon symbols to the filename.
They are supposed and expected to add colons, and that's what they do. What exactly is the "issue"? Compatibility with certain file systems?
Colons are incompatible in filenames on Windows and macOS because they are reserved characters; in Windows, colons are used to denote drive letters and streams, while in macOS, they are treated as directory delimiters. This restriction is enforced to maintain file system integrity and compatibility across different operating systems.
So if one of the TAS users wishes to use one of the shortcuts (%T, %R or %r) in the file name and sent the file to a non-Puppy Linux computer, what might happen might turn up as a compatibility error.
Maybe the shortcuts would be able to produce a dash or an underscore instead of a colon, so the possible incompatibility would be minimized or even eliminated?
Re: Take a Shot! - yet another screenshot utility...
MrDuckGuy wrote: Tue Jan 07, 2025 4:48 pmMochiMoppel wrote: Tue Jan 07, 2025 10:05 amMrDuckGuy wrote: Sun Jan 05, 2025 10:01 pmSo the issue with the file naming shortcuts is with three of the shortcuts that will add colon symbols to the filename.
They are supposed and expected to add colons, and that's what they do. What exactly is the "issue"? Compatibility with certain file systems?
Colons are incompatible in filenames on Windows and macOS because they are reserved characters; in Windows, colons are used to denote drive letters and streams, while in macOS, they are treated as directory delimiters. This restriction is enforced to maintain file system integrity and compatibility across different operating systems.
So if one of the TAS users wishes to use one of the shortcuts (%T, %R or %r) in the file name and sent the file to a non-Puppy Linux computer, what might happen might turn up as a compatibility error.
Maybe the shortcuts would be able to produce a dash or an underscore instead of a colon, so the possible incompatibility would be minimized or even eliminated?
ok got it let fix that since i was messing again with tas thxx to you
Why astronauts use Linux
Because you can't open windows in space
- fredx181
- Posts: 3385
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 437 times
- Been thanked: 1484 times
- Contact:
Re: Take a Shot! - yet another screenshot utility...
This thread is about TAS, new topic for the Xfce Screenshooter would be more appropriate (edit: and much more convenient to find if someone is interested in the Xfce Screenshooter).
- mikewalsh
- Moderator
- Posts: 6525
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 996 times
- Been thanked: 2173 times
Re: Take a Shot! - yet another screenshot utility...
"Off-topic" posts from @pp4mnklinux - plus associated replies - have been split off into their own topic.......which can be found here:-
Cheers.
Mike.
Re: Take a Shot! - yet another screenshot utility...
AntonioPt wrote: Tue Jan 07, 2025 9:28 pmMrDuckGuy wrote: Tue Jan 07, 2025 4:48 pmMochiMoppel wrote: Tue Jan 07, 2025 10:05 amThey are supposed and expected to add colons, and that's what they do. What exactly is the "issue"? Compatibility with certain file systems?
Maybe the shortcuts would be able to produce a dash or an underscore instead of a colon, so the possible incompatibility would be minimized or even eliminated?
ok got it let fix that since i was messing again with tas thxx to you
It occurs to me that perhaps punctuation is not needed, since there already is a way to add punctuation by way of using the existing shortcuts; maybe just having the output consist of a simple stream of numbers is better? Punctuation is more a form of caveat, wouldn't you say?
So we would have if the time were 13:14:15 (thirteenth hour, fourteenth minute, fifteenth second) :
%r = 011415 (pm);
%R = 1314
%T = 131415
If a user wished to add in any kind of punctuation, the user would simply go to the other shortcuts and add them individually.
Re: Take a Shot! - yet another screenshot utility...
MrDuckGuy wrote: Mon Jan 13, 2025 10:31 amAntonioPt wrote: Tue Jan 07, 2025 9:28 pmMrDuckGuy wrote: Tue Jan 07, 2025 4:48 pmMaybe the shortcuts would be able to produce a dash or an underscore instead of a colon, so the possible incompatibility would be minimized or even eliminated?
ok got it let fix that since i was messing again with tas thxx to you
It occurs to me that perhaps punctuation is not needed, since there already is a way to add punctuation by way of using the existing shortcuts; maybe just having the output consist of a simple stream of numbers is better? Punctuation is more a form of caveat, wouldn't you say?
So we would have if the time were 13:14:15 (thirteenth hour, fourteenth minute, fifteenth second) :
%r = 011415 (pm);
%R = 1314
%T = 131415If a user wished to add in any kind of punctuation, the user would simply go to the other shortcuts and add them individually.
ok got it thxx let me see if later i correct that and share it
Why astronauts use Linux
Because you can't open windows in space
Re: Take a Shot! - yet another screenshot utility...
viewtopic.php?p=139453#p139453
Just Updated again now %r or %T or %R no more Colons and remove all so Folders spaces when Burst Mode but since im Portugues screenshot == Captura de ecrã == another issue sinnce aint good policy
gonna see if i can fix that too but for now ":" are gone now in preview and files and no spaces in folders as well
@MrDuckGuy @rockedge @JakeSFR
P.S. Gonna try to see if i can make TAS work once because if i press PrtSc by mistake it will open a bunch of windows what is anoying all so
Why astronauts use Linux
Because you can't open windows in space
Re: Take a Shot! - yet another screenshot utility...
AntonioPt wrote: Tue Jan 14, 2025 11:28 amviewtopic.php?p=139453#p139453Just Updated again now %r or %T or %R no more Colons
I did not have trouble before extracting the earlier version. It was working before but not anymore. Now this is giving only an output but not extracting. I am not able to extract the new version.
Re: Take a Shot! - yet another screenshot utility...
MrDuckGuy wrote: Wed Jan 15, 2025 3:33 amAntonioPt wrote: Tue Jan 14, 2025 11:28 amhttps://forum.puppylinux.com/viewtopic. ... 53#p139453Just Updated again now %r or %T or %R no more Colons
I did not have trouble before extracting the earlier version. It was working before but not anymore. Now this is giving only an output but not extracting. I am not able to extract the new version.
You don't have 7z install what is a different topic
Why astronauts use Linux
Because you can't open windows in space
Re: Take a Shot! - yet another screenshot utility...
I appear to have it working. I even made a few minor edits to it. It is working great.
Re: Take a Shot! v2.0 - yet another screenshot utility...
Hey guys,
Sorry for the late reply, but when I looked at the TAS' code after these 3 years, I decided to refactor it a little bit and change/add a few things, which took me some time, because I'm slow and lazy.
As for the unsafe characters, I was thinking about a few solutions, but the most appealing one turned out to be to replace / with underscores by default, and the rest (\ < > " | * : ? - FAT/NTFS unfriendly) only on-demand.
Also, as for the method of selecting a region - TAS can use xrectsel, so installing it should solve the problem.
Statically linked, 32bit binary is available in the first post.
PS. Thanks Mike for the housekeeping.
___________
Version 2.0:
- avconv and gtkdialog < 0.8.4 are no longer officially supported (may still work, but with glitches)
- removed Burst Mode (it's clunky and not that useful; try Take a Gif instead)
- removed quickshot feature
- live preview of evaluated filename
- option to replace unsafe characters (\"*|<>:?) with underscores
- option to choose image viewer and editor
- option to add a custom action
- option to copy screenshots to clipboard (req. xclip
with -target support)
- option to reuse previously selected area
- refactoring, improvements, bugfixes
First post updated!
Greetings!
Omnia mea mecum porto.
- MochiMoppel
- Posts: 1343
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 521 times
Re: Take a Shot! - yet another screenshot utility...
That's a bit unfortunate because I bet that most users didn't even know that this feature existed. Usually Puppies offer no CLI shooter, like scrot, that can take screenshots without a disturbing GUI. TAS filled this gap.
I used this feature - at least before I rolled my own quickshooter app . I removed some of the rough edges from TAS's code and after the patches I was able to shoot several images per second. When assigning the Print key as keyboard shortcut, TAS would shoot continuously like a camera in burst mode as long as I kept the Print key pressed. Was fun.
- option to reuse previously selected area
Good idea!
I added WEBP to the dropdown list of formats and for me it works because WEBP is supported in BW64. My result for a fullscreen shot:
PNG: 205 K
JPG: 175 K
BMP: 5626 K
TIF: 670 K
GIF: 197 K
WEBP: 92 K
As expected JPG and WEBP are not as crisp as PNG, but WEBP still better than JPG. Of course I agree that PNG should remain the default
Re: Take a Shot! - yet another screenshot utility...
MochiMoppel wrote: Thu Jan 30, 2025 2:47 amThat's a bit unfortunate because I bet that most users didn't even know that this feature existed. Usually Puppies offer no CLI shooter, like scrot, that can take screenshots without a disturbing GUI. TAS filled this gap.
I used this feature - at least before I rolled my own quickshooter app. I removed some of the rough edges from TAS's code and after the patches I was able to shoot several images per second. When assigning the Print key as keyboard shortcut, TAS would shoot continuously like a camera in burst mode as long as I kept the Print key pressed. Was fun.
Yeah, I figured that probably no one's using it, so what's the point.
Besides, such a "quick shot" feature can be easily contained within a one-liner and assigned to the Print key, e.g. (to anyone interested):
Code: Select all
ffmpeg -f x11grab -draw_mouse 1 -s $(xwininfo -root | sed -n 's#.*geometry \([0-9]\+x[0-9]\+\).*#\1#p') -r 25 -i ${DISPLAY} -vframes 1 "Quickshot-$(date +%Y%m%dT%H%M%S).png"
I added WEBP to the dropdown list of formats and for me it works because WEBP is supported in BW64. My result for a fullscreen shot:
PNG: 205 K
JPG: 175 K
BMP: 5626 K![]()
TIF: 670 K
GIF: 197 K
WEBP: 92 K
As expected JPG and WEBP are not as crisp as PNG, but WEBP still better than JPG. Of course I agree that PNG should remain the default
I was thinking about it briefly, but eventually didn't want to add more clobber and wasn't sure if it's widely supported yet.
The size of WEBP output, comparatively, looks quite appealing, though.
Maybe I'll add it in the next version (instead of TIF and BMP?).
Greetings!
Omnia mea mecum porto.
- MochiMoppel
- Posts: 1343
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 521 times
Re: Take a Shot! v2.0 - yet another screenshot utility...
@JakeSFR Regarding avconv: I can't remember where I've seen and used it. Is my assumption correct that when avconv is installed, ffmpeg is not, and vice versa?
Re: Take a Shot! v2.0 - yet another screenshot utility...
@MochiMoppel: most likely, yes. Some Pups had it, like Tahr-6.0.5.
It was pretty much confusing - when some FFmpeg devs created the Libav fork in 2011, they initially kept the original name of the binary (ffmpeg
), before changing it to avconv
, but adding an annotation that ffmpeg is deprecated. It was referring to the command, not the project, though, which wasn't clear.
Anyway, it's been dead for almost 7 years now and no distros are using it anymore.
Greetings!
Omnia mea mecum porto.
- MochiMoppel
- Posts: 1343
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 521 times
Re: Take a Shot! v2.0 - yet another screenshot utility...
Dziękuję!
I used to call ffmpeg/avconv with $(type -p ffmpeg avconv | head -1) <args>
. Good to know that I can do this now without using my head:
$(type -p ffmpeg avconv) <args>
- MochiMoppel
- Posts: 1343
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 22 times
- Been thanked: 521 times
Re: Take a Shot! v2.0 - yet another screenshot utility...
@JakeSFR
Regarding Filename:
The new default filename is Screenshot-%Y%m%dT%H%M%S and after playing with the format options and pretty much screwing up the name I wanted to go back to the default, i.e. reset to default. That doesn't seem to be possible - unless I delete the config files. I therefore made 2 small changes to the script.
- In GUI_MAIN, variable PREVIEW: <input>echo "$(date +"${FILENAME:-$(gettext 'Screenshot')-%Y%m%dT%H%M%S}")" | f_safe</input>
- In script :SAVENAME="${DIRECTORY}/$(date +"${FILENAME:-$(gettext 'Screenshot')-%Y%m%dT%H%M%S}" -d "+ ${DELAY} seconds" | f_safe)"
Now when I delete the contents of the filename box, the preview field will automatically show the converted (not yet visible) default and use it for the next shot. After "Continue" or restart the filename box will show the default.
Regarding syntax info GUI_DLG:
- I find it more readable when left aligned: echo "<text xalign=\"0\"><label>\"${LINE//\\/_}\"</label></text>"
- IMO it should include the %y
option (last two digits of year (00..99)), This option should also be used for the default. Would make the default shorter (presently it's longer than filename box). It's unambiguous for the next 100 years, and that should be suffient for most of us.
- mikewalsh
- Moderator
- Posts: 6525
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 996 times
- Been thanked: 2173 times
Re: Take a Shot! v2.0 - yet another screenshot utility...
MochiMoppel wrote: Sat Feb 01, 2025 1:17 pm@JakeSFR Regarding avconv: I can't remember where I've seen and used it. Is my assumption correct that when avconv is installed, ffmpeg is not, and vice versa?
@MochiMoppel :-
You MAY find this worth a read, Mochi:-
https://blog.pkh.me/p/13-the-ffmpeg-lib ... ation.html
It summarises the "situation" as it existed in the early part of the last decade. There was a lot of confusion surrounding the whole thing at the time, given that the 'LibAV' project was presenting itself as a re-name/complete replacement for the "old" ffmpeg project. But history has a way of straightening things out, and, in hindsight, the 'LibAV' guys were simply incapable of accepting that their 'vision' for the future was a load of waffle (without very much substance behind it). Ffmpeg was still being actively maintained and vigorously worked upon, whereas the 'LibAV' project introduced a ton of regressions.....and seemingly, couldn't care less.
I used to find that by adding one of John van Sickle's static ffmpeg builds to Tahrpup, deleting /usr/bin/avconv, followed by re-creating it AS A LINK to the 'real' ffmpeg, once again everything functioned as it should.
Mike.
Re: Take a Shot! v2.0 - yet another screenshot utility...
MochiMoppel wrote: Sun Feb 02, 2025 11:44 am@JakeSFR
Regarding Filename:
The new default filename is Screenshot-%Y%m%dT%H%M%S and after playing with the format options and pretty much screwing up the name I wanted to go back to the default, i.e. reset to default. That doesn't seem to be possible - unless I delete the config files. I therefore made 2 small changes to the script.
- In GUI_MAIN, variable PREVIEW:<input>echo "$(date +"${FILENAME:-$(gettext 'Screenshot')-%Y%m%dT%H%M%S}")" | f_safe</input>
- In script :SAVENAME="${DIRECTORY}/$(date +"${FILENAME:-$(gettext 'Screenshot')-%Y%m%dT%H%M%S}" -d "+ ${DELAY} seconds" | f_safe)"
Now when I delete the contents of the filename box, the preview field will automatically show the converted (not yet visible) default and use it for the next shot. After "Continue" or restart the filename box will show the default.
Deleting the filename and restarting TAS should reset the filename, without the need of doing anything to the config file.
But yeah, deleting it and taking a shot right away produces .extension file. Will fix it in next version.
Regarding syntax info GUI_DLG:
- I find it more readable when left aligned:echo "<text xalign=\"0\"><label>\"${LINE//\\/_}\"</label></text>"
Hmm, I'll have to compare it visually.
- IMO it should include the
%y
option (last two digits of year (00..99)), This option should also be used for the default. Would make the default shorter (presently it's longer than filename box). It's unambiguous for the next 100 years, and that should be suffient for most of us.
I can include it, but using it by default would be more ambiguous (to third parties and/or after some time), e.g.: 210324 - is it year-month-day or the other way around..?
Besides, I really don't want to read in the papers in 74 years from now, that TAS is not prepared for the Y2.1K problem.
Thanks &
Greetings!
Omnia mea mecum porto.
Re: Take a Shot! v2.1 - yet another screenshot utility...
Version 2.1:
- removed BMP
- added WEBP (thanks to MochiMoppel)
- refactoring, improvements, bugfixes
First post updated!
Note: although ffmpeg in all reasonably recent Pups should support WEBP output, some of them may not be WEBP-ready if it comes for handling it in image viewers/editors/gtkdialog/file managers/etc., due to lack of webp-pixbuf-loader and file (MIME) associations.
Greetings!
Omnia mea mecum porto.
Re: Take a Shot! v2.1 - yet another screenshot utility...
@JakeSFR
Thanks for the update and the inclusion of the webp format to your application.
Is it possible for me to edit your script in regards to the creation of webp images to use a different encoder instead of FFMpeg?
I did compile FFMpeg myself previously and can do again, but I thought as I built a static webp encoder, I could potentially use this instead.
What are your thoughts?
Re: Take a Shot! v2.1 - yet another screenshot utility...
@Jasper: yes, but it would be an ugly hack, like taking a screenshot to PNG and then converting it to WEBP...
Is it because your ffmpeg doesn't support WEBP?
'Coz both cwebp and ffmpeg produce almost identical output.
Static ffmpeg builds (https://johnvansickle.com/ffmpeg/) support WEBP, too.
Anyway, you can do it without modifying the code, by using the "Custom action" feature in Preferences tab:
Code: Select all
CWEBP:cwebp %f -o "${SAVENAME%.*}.webp"
The SAVENAME variable needs to be used directly here, because %f
gets wrapped in double-quotes internally and substitution doesn't work.
Also, cwebp
can't handle TIF/GIF, so only conversion from PNG/JPG does work.
Greetings!
Omnia mea mecum porto.
- Sofiya
- Posts: 2474
- Joined: Tue Dec 07, 2021 9:49 pm
- Has thanked: 1532 times
- Been thanked: 1689 times
Re: Take a Shot! v2.1 - yet another screenshot utility...
KL-Linux https://sofijacom.github.io
KL LINUX Simple fast free
Re: Take a Shot! v2.1 - yet another screenshot utility...
@JakeSFR
Thanks for the quick response.
Unfortunately, the additional command fails to execute correctly.
I will recompile FFMpeg with libwebp encoder/decoder options.
I do not use the static build as I only need a few options for personal use.
- Sofiya
- Posts: 2474
- Joined: Tue Dec 07, 2021 9:49 pm
- Has thanked: 1532 times
- Been thanked: 1689 times
Re: Take a Shot! v2.1 - yet another screenshot utility...
JakeSFR wrote: Wed Nov 09, 2022 11:00 amTAS contains the following translations:
- Polish (me)
- Spanish (nilsonmorales & vicmz) [needs updating]
- French (musher0 & charlie6) [needs updating]
- Dutch (Bert) [needs updating]
- Portuguese (vicmz & AntonioPt) [needs updating]
- Italian (vicmz) [needs updating]
- German (L18L) [needs updating]
- Russian (Sofiya) [needs updating]
___________tas.png
Have fun &
Greetings!
Russian_ language_tas-2.1
- Attachments
-
- Russian_ language_tas-2.1.tar.xz
- (2.38 KiB) Downloaded 3 times
KL-Linux https://sofijacom.github.io
KL LINUX Simple fast free
Re: Take a Shot! v2.1 - yet another screenshot utility...
Jasper wrote: Mon Feb 10, 2025 5:45 pmUnfortunately, the additional command fails to execute correctly.
You need to choose PNG or JPG in the main dialog, not WEBP, then take a shot, and in the preview dialog you'll see an additional button to convert the screenshot to WEBP.
Like I said, it's just an ugly hack...
___________
Thanks @Sofiya, packages reuploaded.
Greetings!
Omnia mea mecum porto.