https://github.com/ornicar/pgn-recorder
Fetches and stores PGN from a URL every second.
https://github.com/ornicar/pgn-recorder
Last synced: 2 months ago
JSON representation
Fetches and stores PGN from a URL every second.
- Host: GitHub
- URL: https://github.com/ornicar/pgn-recorder
- Owner: ornicar
- Created: 2017-06-22T11:07:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T20:35:55.000Z (4 months ago)
- Last Synced: 2025-03-19T02:11:29.238Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 27.3 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTTP endpoint recorder
## Usage
### Record a PGN source
```
pnpm record data/shenzhen http://zhibo.zhisai.net/DA/rounds/round-4/games.pgn 5
```Hits that URL every 5 seconds and store the content to data/shenzhen only when it changes.
### Replay a PGN source
```sh
pnpm replay data/shenzhen
```Opens an HTTP server on port 6399 and serves the files recorded in data/shenzhen.
Each hit to http://localhost:6399/ will serve the next file in the directory.
When the last file is served, the server will stop.