📊 View Latest Report - Updated daily with free certifications & critical CVEs
Store my daily‑log CSV, news‑scan markdown, and automation scripts.
License: MIT
Quick commands to get the repository working on a fresh machine (Windows/PowerShell or WSL/Linux).
- Git
- Python 3.8+ (or 3.x)
- Optionally
pwsh(PowerShell 7) for the preferred hook variant
Run these from the repo root:
# Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\python -m pip install --upgrade pip
# Install test/developer tools
.\.venv\Scripts\python -m pip install pytest
# Install repository hooks (sets local git config core.hooksPath)
./scripts/install-githooks.ps1
# Run unit tests
.\.venv\Scripts\python -m pytest -q
# Run validator (may auto-insert header / normalize dates)
.\.venv\Scripts\python scripts/validate_csv.pypython3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install pytest
./scripts/install-githooks.sh
pytest -q
python3 scripts/validate_csv.pyOr use the Makefile:
make install-hooks
make validate-csvAfter cloning the repository, enable the versioned Git hooks once:
-
Windows (PowerShell):
./scripts/install-githooks.ps1
-
WSL / Git Bash / Linux:
./scripts/install-githooks.sh
-
Or use the Makefile:
make install-hooks
The installer sets the local Git config core.hooksPath to .githooks so hooks are enabled only for that clone.
- Hooks are versioned in the repository so pre-commit logic is reviewed and updated alongside code.
- Local pre-commit checks give quick feedback and prevent malformed rows from entering
daily-log.csv.
scripts/validate_csv.pyvalidates that every non-empty line indaily-log.csvhas exactly 4 comma-separated columns.- The pre-commit hook runs the same check locally and will block commits that stage an invalid
daily-log.csv. - Run locally with:
make validate-csv # or python3 scripts/validate_csv.py
- The installer prefers
pwsh(PowerShell 7). Ifpwshis available on PATH the installer will use thepwsh-shebang hook variant; otherwise it installs a Windows PowerShell fallback so hooks still run on typical Windows systems. - To install PowerShell 7 on Windows:
- Download the latest MSI from: https://github.com/PowerShell/PowerShell/releases/latest
- Run the MSI and accept the defaults (it installs to
C:\Program Files\PowerShell\7\by default). - Open a new terminal and verify with:
pwsh -v - Re-run the installer:
./scripts/install-githooks.ps1
- Hooks are versioned in
.githooks. The installer setscore.hooksPathto.githooksin the local clone, so no global Git state is changed. - The hook tries to run the canonical validator
scripts/validate_csv.pyusingpython3(orpython) if available. If Python is not found, the hook uses a lightweight PowerShell fallback that enforces the 4-column rule. scripts/validate_csv.py:- strips a UTF‑8 BOM if present,
- auto-inserts the header
date,pillar,task,noteswhen the file is empty or when the first row looks like data, - normalizes common date formats into
YYYY-MM-DD, and - validates each data row for 4 columns, a valid date, and non-empty
pillarandtaskfields.
- The workflow
.github/workflows/validate-csv.ymlruns unit tests (pytest) and then the validator; if the validator reports issues on a PR, the workflow comments on the PR with the validator's output to help contributors fix problems quickly.
-
If
pytestisn't found on the command line, use the venv Python to run it:.\.venv\Scripts\python -m pytest -q
-
If
pwsh(PowerShell 7) is not installed, the installer will default to the Windows PowerShell variant so hooks still run on typical Windows systems. To install PowerShell 7 (optional):- Download the MSI: https://github.com/PowerShell/PowerShell/releases/latest
- Run the MSI and accept defaults (adds
pwshto PATH). - Re-run the installer:
./scripts/install-githooks.ps1.
-
If you see a BOM-only or empty
daily-log.csvcausing earlier validator failures, the validator now strips BOMs and will auto-add a header. You can also remove the BOM manually using:(Get-Content -Raw -Encoding UTF8 daily-log.csv) -replace '^\uFEFF','' | Set-Content -Encoding UTF8 daily-log.csv
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
- Setting up your development environment
- Installing Git hooks
- Running tests and validation
- CSV format requirements
- Pull request process
For questions or suggestions, open an issue on GitHub.
MIT – see LICENSE for full text.