https://github.com/permutationlock/merge-pgn
A simple tool to merge several chess games stored in pgn files into a single game with all lines included as variations. Useful for creating pgns for opening trainers such as ChessTempo.
https://github.com/permutationlock/merge-pgn
chess python-chess
Last synced: 11 months ago
JSON representation
A simple tool to merge several chess games stored in pgn files into a single game with all lines included as variations. Useful for creating pgns for opening trainers such as ChessTempo.
- Host: GitHub
- URL: https://github.com/permutationlock/merge-pgn
- Owner: permutationlock
- License: mit
- Created: 2020-05-17T13:54:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-12T06:07:23.000Z (about 5 years ago)
- Last Synced: 2025-03-25T17:23:25.099Z (11 months ago)
- Topics: chess, python-chess
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 31
- Watchers: 3
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.MIT
Awesome Lists containing this project
README
## Merge-PGN
A simple tool for merging several pgn games into a single pgn with one
game including all moves as variations. All headers and comments are ignored as
this is designed only to manipulate the move lines.
Requires you to have [python-chess](https://python-chess.readthedocs.io)
installed.
```
pip install python-chess
```
I needed this tool to construct pgn files to upload to ChessTempo's opening
trainer.
Example:
```
python merge-pgn.py "game1.pgn" "game2.pgn" "games3-7.pgn" > "all_games.pgn"
```