JudobaseStats

module
v0.0.0-...-76d33c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: GPL-3.0

README

JudobaseStats

JudobaseStats is a set of tool to allow judo fans to generate their own judo statistics.

Prerequisites

Have a valid Go installation. It was tested with go 1.22.6.

Scraper

The first tool is a lightweight scraper that allows to download the results of competition easily.

The scraper can be launched with the go run command.

cd JudobaseStats/cmd/scraper
go run scraper.go

It downloads by default the result of the Olympic Games Paris 2024 into the ./data folder.

To change the default values :

go run scraper.go -competition=IJF_COMPETITION_ID -output=FOLDER
Usage
$ go run scraper.go -h
Usage of scraper.exe:
  -competition string
        competition ID in judobase.ijf.org (default "2653")
  -output string
        path of the output folder (default "../../data")

Analyser

The second tool is an analyser. It can be used to analyse the scraped data.

As the scraper, the default values allow to analyse the Olympic Games Paris 2024. The flags allow to set to the desired values.

There are several output modes:

  • stdout: print the analysis to the standard output (default value)
  • txt: print the analysis to txt files. The location of the files is controled with the output flag.
  • csv: format the analysis in a single csv file. The location of the file is controled with the output flag.
  • json: format the analysis in a single json file. The location of the file is controled with the output flag.
Usage :
$ go run analyser.go -h
Usage of analyser.exe:
  -competition string
        competition ID in judobase.ijf.org (default "2653")
  -input string
        path of the input folder (default "../../data")
  -outMode string
        output mode (default "stdout")
  -output string
        path of the output folder (default "../../analysis")

Comparator

Compare JSON analysis generated by the analyser

Usage :
$ go run .\comparator.go -h
Usage of comparator.exe:
  -analysis string
        analysis files to compare (default "analysis-Olympic Games Paris 2024.json,analysis-Olympic Games Tokyo 2020.json,analysis-Olympic Games Rio de Janeiro 2016.json")
  -input string
        path of the input folder (default "../../analysis")

Directories

Path Synopsis
cmd
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL