Coder Social home page Coder Social logo

pogobanane / foxhole-screenparse Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 5.0 1.05 MB

Foxhole-screenparse reads contents of stockpile screenshots to ease logistics planning.

Home Page: https://pogobanane.de/foxhole-screenparse/

License: GNU General Public License v3.0

HTML 5.73% JavaScript 93.60% Makefile 0.42% Python 0.26%
foxhole foxhole-logi ocr

foxhole-screenparse's Introduction

foxhole-screenparse

Note: For my use-cases, foxhole-screenparse has been fully replaced 
by github.com/GICodeWarrior/fir, which is better in basically 
every regard. Foxhole-screenparse is therefore unmaintained now and 
i suggest you also direct your efforts towards fir.

Foxhole-screenparse reads contents of stockpile screenshots to ease logistics planning. To calculate valuable information from the stockpile data, foxhole-screeparse is integrated into the Stocks v6.4 demo Google Spreadsheet (copy sheet). Note that the screenparser sidebar only works when logged in.

Spreadsheet Overview + Insert

More screenshots

Spreadsheet Overview Spreadsheet Production

Foxhole-screenparse is also available as a standalone website with a simple table output.

Spreadsheet Admin Checklist

Here you find a checklist for what to do when setting up the spreadsheet for your clan at the start of a war.

1. Copy the template

Item tech as of start of war: Stocks v6 template

2. Access policies

We suggest to set the following gloabl and per-sheet/tab settings:

Spreadsheet global: everyone who has the document link can edit (everyone in your clan can update the stockpiles)

Protect the sheet

Per sheet access:

  • Overview, ..., Everything, Vehicles should only be writable by sheed developers (admins).
  • Input / Screenparse by everyone (it is source for stockpile data)
  • Settings by your clans logistics officers to enable/disable stockpiles and set targets.

To increase security you can restrict access to the entire spreadsheet to verified google accounts only.

We strongly recommend to create a new copy of the file for each war. This way the spreadsheet link changes regularly which protects against data leaks.

3. Set up stockpiles

Set the stockpile town names, region and description and put checkboxes to on which tabs the stockpile should be displayed. When checking checkboxes too quickly, google scripts may time out and the automated unfolding of stockpiles in other tabs may fail. Just retry in such cases.

Stockpile names

4. Final steps

  • Publish the link to the spreadsheet in your clan/discord.
  • Leave a note in the spreadsheet which is being replaced about its deprication.
  • Occasionally update the tech status.

Update teched

Technical Overview

Foxhole-screenparse parses contents of stockpiles into machine-readable lists. It uses a naive image processing approach using openCVs template matching and tesseract for OCR/text recognition. Both of those libraries run directly in your browser using wasm and thelike.

screenparse Stockpiler fir
platform browser based windows app browser based
Seaports/Storage Depots yes yes yes
Bunker Bases etc. partially yes yes
Supports different resolutions 1080p - 4k manual work required everything
Supports modded item icons some manual work required excellent
imaging tech openCV, tesseract OCR openCV machine learning
language js py js

Build / Deploy

This repo contains two sub-projects: A standalone statically served website (./index.html) and a google spreadsheets sidebar (./apps-script/).

Standalone Website

Clone this repository with all submodules: git clone --recurse-submodules [repourl]

Pull to fetch updates: git pull && git submodule update

Run a debugging server: make debug

The webpage has no backend, so just shove the files into some webroot or so which has its files statically served (i.e. make install).

Google Spreadsheet Sidebar

Use make appsscript to package the files (./apps-script/build). Those files will be pushed to google via googles clasp. You can just as well copy and paste the build files to the Apps Script area of your spreadsheet to incorporate the sidebar, for example if you don't have clasp installed.

Conribute

This project can use some work on the front-end. The frontend could be set up with proper compilation steps (react).

While the output table is built to be exported into spreadsheets, the relevant spreadsheet functionality could directly be built into the website.

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.