Skip to content

Juni-crypto/chessencryption

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Files

bot-upgrade.py

This script allows you to upgrade a regular Lichess account into a bot account. The upgrade_to_bot_account function sends a POST request to the Lichess API to convert the account to a bot.

  • Functions:
    • upgrade_to_bot_account(api_token: str): Upgrades a Lichess account to a bot account using the provided API token.

Source file: bot-upgrade.py


create_chess_video.py

This script generates a video replay of a chess game based on a PGN file. It uses Pygame to create frames of the chessboard, saving each as an image, and then uses ffmpeg to compile these images into a video.

  • Features:
    • Visualize a chess game from PGN and save each frame as an image.
    • Compile saved images into an MP4 video using ffmpeg.

Source file: create_chess_video.py


decode.py

This script decodes a file that has been encoded into PGN-formatted chess games. The decode function reads a PGN string, decodes the binary data from chess moves, and reconstructs the original file.

  • Functions:
    • decode(pgn_string: str, output_file_path: str): Decodes a file from a PGN string and writes it to the output file path.
    • run_decoder(): CLI interface for decoding PGN games to files.

Source file: decode.py


encode.py

This script encodes a file into a series of chess games stored in PGN format. It reads the binary data from a file, converts it into chess moves, and stores the moves as PGN games.

  • Functions:
    • encode(file_path: str): Encodes a file into chess games in PGN format.
    • run_encoder(): CLI interface for encoding files to PGN format.

Source file: encode.py


api.py

This script automates chess matches between two Lichess bot accounts. It includes functions for challenging a bot, accepting a challenge, and playing a sequence of predefined PGN moves between two bots.

  • Features:
    • Automates bot-to-bot chess matches.
    • Uses the Lichess API to create and accept challenges.
    • Executes predefined PGN moves.

Source file: api.py


Special Thanks

Special thanks to the YouTube video Storing Files in Chess Games for Free Cloud Storage for the inspiration and concept behind this project. This project builds upon ideas introduced in the video, applying them to create a practical implementation for file encryption using chess games.

Additional thanks to:


About

Chess Encryption 🔑

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%