helloSystem / Utilities

Utilities written in PyQt5, meant for use with helloSystem
BSD 2-Clause "Simplified" License
28 stars 29 forks source link

Add screenshot functionality to Screencast and choose storage location #206

Open louies0623 opened 1 year ago

louies0623 commented 1 year ago

Add a screenshot function to Screencast and select the storage location, which is more convenient when needed.

Hierosme commented 1 year ago

Look not really hard to do.

Here an exemple: https://github.com/Python-Devs-Brasil/PyQt5-Tutorials/blob/master/Post-2(QtCore)/screenshot.py

Informations: https://flylib.com/books/en/2.585.1.260/1/

Technical details: https://stackoverflow.com/questions/25056754/how-to-grab-a-desktop-screenshot-with-pyqt

probonopd commented 1 year ago

screenshot.py works.

Now, how do we get this on Command-Shift-3? Possibly it would be best to integrate this functionality into Menu which is running all the time and hence can catch the Command-Shift-3 shortcut at all times.

Storage location should be the Desktop.

Hierosme commented 1 year ago

May i add Grab.app inside Utilities then use screenshot.py as base.

If look the original Grab.app it havent a lot to do. 3 dialogs + Menu (For shortcut)

Hierosme commented 1 year ago

For Select Area or Window screenshot it is require to use low level lib like XLib.

it have a exemple here: https://www.initbrain.fr/code/2015/screenshot-tool/

Unfortunally thta is the only way ...

the code work under helloSystem if install pyton lib via pip install xlib

we can do the bad boys and include the python xlib inside the grab.app... what about add python xlib inside helloSytem ?

Hierosme commented 1 year ago

I havent resist to make a try https://github.com/helloSystem/Utilities/pull/217 about ScreenShoter. I have use as base the screenshot.py and create a UI via QDesigner.

All ready implemented

I hope you'll enjoy it.

probonopd commented 1 year ago

The most important feature (for me) would be Command-Shift-3, then taking and directly saving the screenshot on the desktop while playing the camera sound, without asking further questions. I will likely implement this in Menu.app, since it is always running.

Hierosme commented 1 year ago

Command-Shift-3 is a global shortcut, but it is a service provide by a utility like Grab.app.

That is possible to call a dedicated entry point.

Normaly under OsX the Menu.app recive services from Application then the Menu is the entry point for the user.

The Documentation say: You can create screen shots without Grab.app. Press Command-Shift-3 to capture the entire screen or Command-Shift-4 to capture a portion of the screen. The screen shot is automatically saved on the desktop as a PDF file.

Grab.app is the good App suppose to provide a ScreenShoot for a window with multy screen , a timer , etc ... (That require to speack with pyXLib)

Hierosme commented 1 year ago

After think a moment here (for me) the best require feature.

I got 2 usages

For hight speed meeting screenshot i need (Require helloSystem Menu.app global shortcut)

For documentation i need (Require pyXLib module installation)

Hierosme commented 1 year ago

I propose to make the ScreenShot effort for helloSystem users. By have simple and powerfull ScreenShot tools , users we report easilly trouble, and in general got more helloSystem screenshoot under internet.

Hierosme commented 1 year ago

A issue have been create to deal with the case of hight speed meeting screenshot: https://github.com/helloSystem/Menu/issues/169

Hierosme commented 1 year ago

I think we should open a new issue to address the Screenshot for documentation and bug report cases. The global shortcurt hightspeed shortcut have been address by a issue in Menu.app

then we should consider ScreenCast should not have it responssability

from my point i have take a look on ScreenCast.app code , the code is not really ready to deal with Screenshot, because the entire job is send to ffmpeg.

Grab.app is a good candidate but require work with pyXlib