GithubHelp home page GithubHelp logo

freeslave / hlbmpwatcher Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

Automatically convert newly taken Half-Life screenshots from BMP to PNG

License: MIT License

Python 97.14% Shell 2.86%
goldsource half-life halflife svencoop

hlbmpwatcher's Introduction

Half-Life BMP watcher Build Status

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 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

./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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.