https://github.com/freeslave/hlbmpwatcher
Automatically convert newly taken Half-Life screenshots from BMP to PNG
https://github.com/freeslave/hlbmpwatcher
goldsource half-life halflife svencoop
Last synced: 7 months ago
JSON representation
Automatically convert newly taken Half-Life screenshots from BMP to PNG
- Host: GitHub
- URL: https://github.com/freeslave/hlbmpwatcher
- Owner: FreeSlave
- License: mit
- Created: 2023-08-21T23:11:46.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T00:17:46.000Z (over 1 year ago)
- Last Synced: 2025-01-22T14:45:45.516Z (over 1 year ago)
- Topics: goldsource, half-life, halflife, svencoop
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Half-Life BMP watcher [](https://github.com/FreeSlave/hlbmpwatcher/actions/workflows/build.yml)
Script for automatic conversion of Half-Life screenshots from BMP to PNG format.
## Reasoning
I got tired of converting game screenshots to PNG manually before sending them to the somewhere else. BMP files are too big and some software doesn't support embedding of BMP images (e.g. Discord shows them as regular uploads).
## Dependencies
You'll need a Python 3 and following packages:
```
pip3 install watchdog pillow
```
## Usage
On Unix-like systems just execute the script in terminal (or put it as a [startup](https://wiki.archlinux.org/title/autostarting) script).
On Windows run it with python:
```
python hlbmpwatcher
```
or, if you downloaded the generated exe-file just run hlbmpwatcher.exe
The script will automatically detect the path where Half-Life is installed and will scan it for mod subdirectories. It also will check if you have Sven Co-op installed. The script will watch mod directories and Sven Co-op screenshots directory for new screenshots to automatically convert them to PNG. The automatic path detection works only for Steam version of Half-Life. You can pass other paths as additional arguments manually.
### Commandline options
Run the script (or executable) with the `--help` parameter to see available options.
Use `--convert-existing` option if you want to convert screenshots that existed prior to running the tool.
Use `--no-watch` option to disable file watching. The tool will exit after showing the paths and converting existing .bmp images (if `--convert-existing` was provided).
### Create systemd unit for Linux
You can generate systemd service file and add it to your user services by running
```sh
./generate-systemd-service.sh
# examine generated hlbmpwatcher.service. You can add parameters for hlbmpwatcher in ExecStart field if you want
mkdir -p ~/.config/systemd/user/
cp hlbmpwatcher.service ~/.config/systemd/user/
systemctl --user enable hlbmpwatcher.service
systemctl --user start hlbmpwatcher.service
```