Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bohdanbobrowski/digikam_screensaver
Windows screensaver, from pictures loaded out from Digikam database in Python
https://github.com/bohdanbobrowski/digikam_screensaver
digikam python screensaver sqlite sqlite3 tkinter tkinter-gui win32api windows
Last synced: 29 days ago
JSON representation
Windows screensaver, from pictures loaded out from Digikam database in Python
- Host: GitHub
- URL: https://github.com/bohdanbobrowski/digikam_screensaver
- Owner: bohdanbobrowski
- Created: 2024-10-09T21:02:15.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-18T14:14:36.000Z (30 days ago)
- Last Synced: 2024-10-19T05:48:22.094Z (29 days ago)
- Topics: digikam, python, screensaver, sqlite, sqlite3, tkinter, tkinter-gui, win32api, windows
- Language: Python
- Homepage:
- Size: 245 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DigiKam Screensaver
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/bohdanbobrowski/digikam_screensaver/graphs/commit-activity) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/) ![GitHub all releases](https://img.shields.io/github/downloads/bohdanbobrowski/digikam_screensaver/total) ![GitHub release (with filter)](https://img.shields.io/github/v/release/bohdanbobrowski/digikam_screensaver) ![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/bohdanbobrowski/digikam_screensaver)
Windows screensaver, from pictures loaded out from DigiKam database in Python.
As for now - this is just for Windows.
## Features
- Takes random photos from digikam4.db SQLite database - but only `*.jpg` and rated (with at least one star).
- Some configuration is needed.
- Database is opened in read-only mode!
- Pressing `` will (obviously) turn off screen saver, but I've added a function that will open current picture in associated app.## Known issues
- screensaver work just **for one monitor**
- **preview does not work**: _none of python screensaver examples has this feature_, and to make it working I need to
display screensaver in given window handler number (Windows passes it via cmdline, I'm parsing that but Tkinter AFAIK
can't display or create window inside other window): see how it's done
[here, in C](https://github.com/henrypp/matrix/blob/master/src/main.c).
- because of these two problems above, I'm considering change Tkinter to other library
([Arcade](https://api.arcade.academy/en/latest/index.html)? [Pygame](https://www.pygame.org/news)?) and keep Tkinter
just for configuration window
- the choice of Python for this kind of program (it's more for a demonstration - hold my beer, I'll show you something
cool) is not very optimal, mainly because of the size and the way the binary generated by PyInstaller works,
it's also like a **red rag to a bull for antiviruses**... but anyone who knows anything about PyInstaller will understand## Dev environment
This will work on Windows cmd:
git clone [email protected]:bohdanbobrowski/digikam_screensaver.git
cd digikam_screensaver
python -m venv venv
venv\Scripts\activate
pip install -e '.[dev]'Run configuration windows first:
python digikam_screensaver/screen_saver.py /c
It should look like this:
![digikam_screensaver_configuration_window.jpg](assets%2Fdigikam_screensaver_configuration_window.jpg)
Then, to test how does it work just type:
python digikam_screensaver/screen_saver.py /s
Preview mode can be reached by typing:
python digikam_screensaver/screen_saver.py /c
### Building own *.scr
If all required stuff is installed in system, this command should make the job:
python digikam_digikam_screensaver_build.py
You'll find exe in `.\dist` folder - just rename it and install.
## Documentation and inspiration
### Python:
1. https://github.com/SirGnip/arcade_screensaver_framework
2. https://github.com/gaming32/Windows-ScreensaverThis might be interesting, according attaching window to given win32 handler:
3. https://github.com/quasar098/dvd-screensaver/blob/master/main.py
### C:
4. https://github.com/henrypp/matrix
### Win32 Screensaver API documentation:
5. https://learn.microsoft.com/en-us/windows/win32/lwef/screen-saver-library
6. https://learn.microsoft.com/en-us/previous-versions/troubleshoot/windows/win32/screen-saver-command-line