Giter VIP home page Giter VIP logo

bg-alert-classic's Introduction

bg-alert-classic

A client/server tool to continuously capture a specific area of the screen containing Classic WoW BG timers for OCR analysis and alerting.

WeakAura

Classic BG Timer OCR

A custom WeakAura manages timer display and formatting within WoW which is then analyzed by screen capture by the client tool.

cli

A Windows Go client to screenshot an area of the screen and

  • save as png
  • run OCR analysis for battleground timers
  • post message to discord channel via webhook
  • run once or continually in daemon mode
# starts both server and client containers in development
# specify server|client service name to control individually
docker-compose up -d

# attach terminal to container
# or attach via vs code remote container to install extensions
docker-compose exec client bash

# build executable inside container
# client.exe output to client folder
./build_client_windows.sh

server

node.js express server providing the OCR capabilities via a single POST endpoint.

Use tesseract.js to analyze screenshots of WoW Classic WeakAuras showing active battleground timers.

WeakAura examples:

All active Queue popped

When one bg is ready for entry other active timers pause. Other timers will show the time already waited as a negative value rather than the expected time remaining, as shown in the second example screenshot.

# starts both server and client containers in development
# specify server|client service name to control individually
docker-compose up -d

# enter container to run one-off script or start express server
docker-compose exec server bash

One-off

# node ocr.js <imagename>

node ocr.js testdata/test2.png

Results

[
  {
    "bg": "AB",
    "hours": undefined,
    "minutes": "-01",
    "seconds": "15",
    "ready": false
  },
  {
    "bg": "WS",
    "hours": undefined,
    "minutes": undefined,
    "seconds": undefined,
    "ready": true
  }
]

Express API Server

# start the server and reload on changes via nodemon
npm start

# analyze an image
curl -F image=@server/testdata/test.png http://localhost:3003

Response

[
  { "bg": "AB", "minutes": "04", "seconds": "21", "ready": false },
  { "bg": "AV", "hours": "01", "minutes": "59", "ready": false },
  { "bg": "WS", "minutes": "01", "seconds": "13", "ready": false }
]

bg-alert-classic's People

Contributors

lobsterbandit avatar

Stargazers

 avatar

Watchers

 avatar

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.