GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nas5w/pgn-converter: A simple python script to convert PGN files between LiChess and ChessBase formats

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
chessbase-to-lichess
chessbase-to-lichess
 
 
lichess-to-chessbase
lichess-to-chessbase
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
convert.py
convert.py
 
 
test_utils.py
test_utils.py
 
 
utils.py
utils.py
 
 

Repository files navigation

PGN Converter

A simple python script to convert PGN formats between LiChess and ChessBase.

Installation

Clone down the repository:

git clone [email protected]:nas5w/pgn-converter.git

cd into the directory and run the converter

cd pgn-converter
python convert.py

You should see an output explaining that there are no files to be converted:

-----
No new lichess to chessbase files.
-----
No new chessbase to lichess files.

Converting files

LiChess to ChessBase

If you have a pgn file from LiChess that needs to be converted to ChessBase, put the pgn file in the following directory:

lichess-to-chessbase/input

Then, re-run the converter script:

python convert.py

If the conversion has been successful, you should see the following output:

-----
Converting 1 lichess to chessbase file(s):
  my-game-file.pgn...DONE
-----
No new chessbase to lichess files.

ChessBase to LiChess

If you have a pgn file from ChessBase that needs to be converted to LiChess, put the pgn file in the following directory:

chessbase-to-lichess/input

Then, re-run the converter script:

python convert.py

If the conversion has been successful, you should see the following output:

-----
No new lichess to chessbase files.
-----
Converting 1 chessbase to lichess file(s):
  my-game-file.pgn...DONE

Testing

The project has a suite of unit tests covering the conversion logic in utils.py. Tests use the Python standard library unittest and have no external dependencies, so no installation is required.

Run the tests from the project root:

python -m unittest test_utils

For verbose output showing each individual test:

python -m unittest test_utils -v

All tests should pass:

----------------------------------------------------------------------
Ran 18 tests in 0.004s

OK

Contributing

If you see any issues or want to make and contributions, please open a GitHub issue and we can discuss!

About

A simple python script to convert PGN files between LiChess and ChessBase formats

Topics

chesschessbaselichesspython

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

1 watching

Forks

1 fork
Report repository

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.