Skip to content

Commit

Permalink
Merge pull request #26 from Afgan0r/schedule
Browse files Browse the repository at this point in the history
Added scheduler
  • Loading branch information
Afgan0r authored Apr 21, 2024
2 parents b81618b + 62698fe commit 496e310
Show file tree
Hide file tree
Showing 134 changed files with 10,457 additions and 8,828 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,29 @@ jobs:
name: Linter
steps:
- uses: actions/checkout@v3
- uses: c-hive/gha-yarn-cache@v2
- name: Install dependencies
run: yarn install
run: npm i
- name: Run linter
run: yarn lint
run: npm run lint

tsc:
runs-on: ubuntu-latest
name: Types check
steps:
- uses: actions/checkout@v3
- uses: c-hive/gha-yarn-cache@v2
- name: Install dependencies
run: yarn install
run: npm i
- name: Run the types check
run: yarn tsc
run: npm run tsc

tests:
runs-on: ubuntu-latest
name: Tests
steps:
- uses: actions/checkout@v3
- uses: c-hive/gha-yarn-cache@v2
- name: Install dependencies
run: yarn install
run: npm i
- name: Run the tests
run: yarn test
run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/node_modules
/dist
/yarn-error.log
/output
/coverage
/replaysList.json
/scripts
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.18.1
v18.14.0
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

46 changes: 5 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,15 @@

[![codecov](https://codecov.io/gh/Afgan0r/sg-replay-parser/branch/master/graph/badge.svg?token=GP4996N1SK)](https://codecov.io/gh/Afgan0r/sg-replay-parser)

## About

This app gets all replays from https://sg.zone/replays and then calculates the stats for each player and squad

## Example of data usage (not my website):

https://solid-stats.web.app/

## Output
---

This application outputs several JSON files:
1) Global statistics
2) Squad statistics
3) Weapons statistics (firearms and vehicles separately)
4) By weeks statistics
5) Other players statistics (top players killed, teamkilled, killers and teamkillers)
> **[21.04.2024] DEPRECATED:** This parser no longer maintaining. More info [here](https://sg.zone/topic/30?p=17#p163). Feel free to contact me if you need more information. Contacts can be found [below](#contacts)
## Limitations
---

- If you change nickname, then your statistics will count from scratch. That's because there is no way to get the player's steam id. Can be avoided by creating a ticket via [this form (in russian)](https://docs.google.com/forms/d/e/1FAIpQLSfKyUsQzf0Hrv6rgZdbbvN2wh0KPzN5r3Ag-Uf2oETxMMCDUw/viewform)
- Statistics will not be 100% accurate because of possible bugs in the replay
- Since anti ddos protection was added to the website it has become impossible for a common user to parse replays. If you need help with that, you can contact the author through the contacts below

## How to get statistics

### If you have already installed NodeJS and yarn

1. Install dependencies
```sh
yarn install
```
2. Prepare replays list and start parsing replays
```sh
yarn build-with-prepare
```
or
```sh
yarn prepare-replays
yarn build
```
3. Get statistics from folder `output`

## Contributing
## About

If you find bugs in the app or want to suggest new features, you should open the issue
This app contains several jobs, that parses replays data from <https://sg.zone/replays>

## Contacts

Expand Down
12 changes: 8 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
"setupFiles": [
"./src/!tests/setupFetch.ts"
],
collectCoverage: true,
collectCoverageFrom: [
'./src/**/*.ts',
'!./src/**/*.d.ts',
'!./src/index.ts',
'!./src/schedule.ts',
'!./src/start.ts',
'!./src/*consts/gameTypesArray.ts',
'!./src/*utils/progressHandler.ts',
'!./src/*utils/formatGameType.ts',
'!./src/*utils/pipe.ts',
'!./src/*utils/promiseAllWithProgress.ts',
'!./src/*utils/generateBasicFolders.ts',
'!./src/*utils/generateBasicHTML.ts',
'!./src/*utils/logger.ts',
'!./src/*utils/request.ts',
'!./src/*output/**/*.ts',
'!./src/!prepareReplaysList/**/*.ts',
'!./src/!yearStatistics/**/*.ts',
'!./src/!tests/**/*.ts',
'!./src/jobs/**/*.ts',
],
"automock": false,
"resetMocks": false,
Expand Down
Loading

0 comments on commit 496e310

Please sign in to comment.