Skip to content

pablofueros/python-ecd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-ecd logo

✨ A Python CLI tool for managing Everybody Codes puzzles ✨

Code Quality Release PyPI Latest Release PyPI Downloads versions


💛 Acknowledgements

This tool relies on the Everybody Codes Data library. Shout out to @wimglenn!

📋 Features

  • Initialize workspace for Everybody Codes puzzles
  • Download puzzle inputs automatically
  • Manage session tokens securely
  • Run solutions with both test and real input data
  • Submit solutions and check if they are correct

📦 Installation

The package can be installed using uv, which is recommended for better dependency management and faster installations:

# Install it as a system tool
uv tool install python-ecd

# Otherwise use:
uvx python-ecd

The tool will be available as both 'python-ecd' and 'ecd'

💻 Usage

Initialize a Workspace

Create a new workspace for your puzzles solutions:

It can be done in the current directory:

ecd init

Or in a specified path:

ecd init everybody-codes-solutions

Note that if the directory does not exist, it will be created.

Options:

  • --force, -f: Overwrite existing files

Set Session Token

Configure your session token for accessing puzzle inputs:

ecd set-token <TOKEN>

Note that is not necessary if you set it during initialization.

Download Puzzle Input

Download the input for all available part

ecd pull <QUEST_NUMBER> [OPTIONS]

Options:

  • --year, -y: Event year (default: actual)
  • --force, -f: Overwrite existing files

This command will create the necessary dirs and files if they do not exist.

Test Solutions

Run your solution using test data:

ecd test <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to test (default: 1)

Run Solutions

Execute your solution for a specific puzzle:

ecd run <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to execute (default: 1)

Submit Solutions

Submit your solution for a specific puzzle:

ecd push <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to test (default: 1)

Note that next available part (if exists) will be pulled automatically if the result is correct.

Display Version

Show the current version of the tool:

ecd --version

©️ License

This project is licensed under the terms of the MIT license.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Python CLI for Everybody Codes

Resources

License

Stars

Watchers

Forks

Packages

No packages published