diff --git a/README.md b/README.md index 58c4937..efca711 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,78 @@ -# ๐Ÿ” Caesar Cipher - -A beginner-friendly Python program that encodes and decodes messages with the Caesar cipher. - -## ๐Ÿ“š Table of Contents - -- [Overview](#-overview) -- [Requirements](#-requirements) -- [Setup](#-setup) -- [Run](#-run) -- [Tests](#-tests) -- [License](#-license) -- [Links](#-links) - -## ๐Ÿงญ Overview - -The Caesar cipher shifts every letter by a fixed number of places (with a shift of 3, `E` becomes `H`). This project, from Udemy's *100 Days of Code: The Complete Python Pro Bootcamp* (Day 8), finds letter positions with `list.index` and wraps around the alphabet with the modulo operator. The interactive program lets you encode or decode as many messages as you like. Code lives in `src/`, tests in `tests/`, docs in `docs/`. - -## ๐Ÿ“‹ Requirements - -- Python 3.13 or newer -- `pytest` (development only; no runtime dependencies) -- Optional: [Doxygen](https://www.doxygen.nl/) to build the API docs - -## ๐Ÿ› ๏ธ Setup - -Create and activate a local virtual environment, then upgrade pip and install the project: - -```bash -python -m venv .venv -``` - -Activate it: - -```bash -# Linux / macOS -source .venv/bin/activate -# Git Bash on Windows -source .venv/Scripts/activate -``` - -```powershell -# Windows PowerShell -.venv\Scripts\Activate.ps1 -``` - -```bash -python -m pip install --upgrade pip -python -m pip install -e ".[dev]" -``` - -## โ–ถ๏ธ Run - -```bash -python -m caesar_cipher -``` - -or, after installation, `caesar-cipher`. - -## ๐Ÿงช Tests - -```bash -python -m pytest -``` - -Build the API docs with `doxygen Doxyfile` (output in `docs/doxygen/html`). - -## ๐Ÿ“„ License - -GNU AGPL-3.0 โ€“ see [LICENSE](LICENSE). - -## ๐Ÿ”— Links - -- [Repository](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code) -- [Documentation](docs/index.md) -- [Issue tracker](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code/008-caesar_cipher/issues) +# ๐Ÿ” Caesar Cipher + +A beginner-friendly Python program that encodes and decodes messages with the Caesar cipher. + +## ๐Ÿ“š Table of Contents + +- [Overview](#-overview) +- [Requirements](#-requirements) +- [Setup](#-setup) +- [Run](#-run) +- [Tests](#-tests) +- [License](#-license) +- [Links](#-links) + +## ๐Ÿงญ Overview + +The Caesar cipher shifts every letter by a fixed number of places (with a shift of 3, `E` becomes `H`). This project, from Udemy's *100 Days of Code: The Complete Python Pro Bootcamp* (Day 8), finds letter positions with `list.index` and wraps around the alphabet with the modulo operator. The interactive program lets you encode or decode as many messages as you like. Code lives in `src/`, tests in `tests/`, docs in `docs/`. + +## ๐Ÿ“‹ Requirements + +- Python 3.13 or newer +- `pytest` (development only; no runtime dependencies) +- Optional: [Doxygen](https://www.doxygen.nl/) to build the API docs + +## ๐Ÿ› ๏ธ Setup + +Create and activate a local virtual environment, then upgrade pip and install the project: + +```bash +python -m venv .venv +``` + +Activate it: + +```bash +# Linux / macOS +source .venv/bin/activate +# Git Bash on Windows +source .venv/Scripts/activate +``` + +```powershell +# Windows PowerShell +.venv\Scripts\Activate.ps1 +``` + +```bash +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## โ–ถ๏ธ Run + +```bash +python -m caesar_cipher +``` + +or, after installation, `caesar-cipher`. + +![Caesar cipher running in a terminal](docs/images/screenshot.svg) + +## ๐Ÿงช Tests + +```bash +python -m pytest +``` + +Build the API docs with `doxygen Doxyfile` (output in `docs/doxygen/html`). + +## ๐Ÿ“„ License + +GNU AGPL-3.0 โ€“ see [LICENSE](LICENSE). + +## ๐Ÿ”— Links + +- [Repository](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code) +- [Documentation](docs/index.md) +- [Issue tracker](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code/008-caesar_cipher/issues) diff --git a/docs/images/screenshot.svg b/docs/images/screenshot.svg new file mode 100644 index 0000000..d9c94fe --- /dev/null +++ b/docs/images/screenshot.svg @@ -0,0 +1,35 @@ + + + + + ____ _ _____ ____ _ ____ + / ___| / \ | ____/ ___| / \ | _ \ +| | / _ \ | _| \___ \ / _ \ | |_) | +| |___ / ___ \| |___ ___) / ___ \| _ < + \____/_/ \_\_____|____/_/ \_\_| \_\ + ____ ___ ____ _ _ _____ ____ + / ___|_ _| _ \| | | | ____| _ \ +| | | || |_) | |_| | _| | |_) | +| |___ | || __/| _ | |___| _ < + \____|___|_| |_| |_|_____|_| \_\ + +Type 'encode' to encrypt, type 'decode' to decrypt: +encode +Type your message: +Hello, World! +Type the shift number: +3 +Here's the encoded result: Khoor, Zruog! +Type 'yes' if you want to go again. Otherwise type 'no'. +yes +Type 'encode' to encrypt, type 'decode' to decrypt: +decode +Type your message: +Khoor, Zruog! +Type the shift number: +3 +Here's the decoded result: Hello, World! +Type 'yes' if you want to go again. Otherwise type 'no'. +no +Goodbye + \ No newline at end of file