Skip to content

Releases: fchastanet/bash-tools-framework

6.5.3

Choose a tag to compare

@fchastanet fchastanet released this 18 May 07:46

Bug Fix:

  • [html2image] fixed stdin detection

Full Changelog: 6.5.2...6.5.3

6.5.1

Choose a tag to compare

@fchastanet fchastanet released this 10 May 22:22

Fixed issue with rimage pre-commit hook

Full Changelog: 6.5.0...6.5.1

6.5.0

Choose a tag to compare

@fchastanet fchastanet released this 26 Apr 11:23
853104c

✨(html2image): Add html2image command for converting HTML to images (#134)

Introduce the html2image command to convert HTML files into images using Puppeteer. This command supports various formats and options for customization.

1. ✨ html2image Command

  • Implemented the html2image command to convert HTML files to PNG, JPEG, and WEBP formats.
  • Added support for transforming commands and processing files from git repositories, specified files, or stdin.

2. 🔧 Options and Configuration

  • Configured multiple options for output format, directory, and CSS injection.
  • Included detailed help and usage examples for user guidance.
  • added 2 pre-commit hooks to generated images from html or from markwhen files

3. 📄 Documentation

  • Provided comprehensive long descriptions and usage examples within the command definition.

This command enhances the framework's capabilities by allowing users to easily convert HTML content into images, facilitating better integration with various workflows and use cases.

Full Changelog: 6.4.0...6.5.0

6.4.0

Choose a tag to compare

@fchastanet fchastanet released this 10 Apr 19:11

[🔧refactor][project]: Improve PlantUML, ShellCheck, linting, and CI workflow

Consolidate tooling and lint improvements: upgrade PlantUML to 3.3 (fail on syntax
errors), refine ShellCheck output and parallelization, fix File::detectBashFile
concurrency and xargs logic, and move pre-commit transformation to GitHub
workflow.

🔧 Tooling & Refactor

  • Upgrade PlantUML to 3.3; refactor convertPuml to use a more robust Docker
    command, enable set -o pipefail -o errexit so PlantUML fails on syntax errors,
    avoid generating images with errors, and restore metadata to prevent unwanted
    updates.
  • Improve ShellCheck runner: add progress indication, refine output handling and
    failure logging, add an error-count display, and ensure correct formatting for
    checkstyle, json, json1, and tty outputs.
  • Restore parallelization in shellcheckLint and set default log level to INFO.

🐛 Fixes

  • Fix File::detectBashFile concurrency by introducing
    File::detectBashFileInit to avoid temp-file collisions when multiple
    processes run concurrently.
  • Fix xargs logic used by frameworkLint, shellcheckLint, and
    findShebangFiles to ensure all matching files are processed.

🚀 CI & Workflow

  • Move pre-commit configuration transformation to the GitHub workflow for
    centralized CI management.

📄 Documentation

  • Update SVG diagram and synchronize related files to reflect the PlantUML
    version and tooling changes.

No breaking changes.

Full Changelog: 6.3.5...6.4.0

6.3.4

Choose a tag to compare

@fchastanet fchastanet released this 06 Apr 18:24

✨🔧(shellcheck/hooks): Ensure shellcheck install, exit code & docs

Ensure ShellCheck is installed and up-to-date and make bin/shellcheckLint
exit with code 1 when any file fails. Remove PNG output from PlantUML hooks,
align cspell configs, and fix lint issues for consistency.

1. ✨ ShellCheck & Linting

  • Ensure shellcheck binary is installed and kept up to date.
  • Make bin/shellcheckLint return exit code 1 when any file fails.
  • Add Format::duration helper (new formatting utility).
  • Fix various lint errors uncovered by stricter checks.

2. ✨ Hooks / PlantUML

  • Remove PNG generation from PlantUML hooks; keep SVG only.
  • Fix bug when no --include-paths option is provided.
  • Replace PNG artifacts with SVG files in documentation.

3. 🔧 cspell & Config Alignment

  • Align cspell configuration across all bash projects.
  • Fix cspellForbidden hook name typo.

4. 💥 Breaking Changes

  • PlantUML hooks no longer emit PNG files; update downstream consumers.
  • CI and automation may now fail on shellcheck issues due to exit-code change.

5. ✅ Misc

  • General lint fixes and formatting cleanups across the codebase.

Full Changelog: 6.3.2...6.3.4

6.3.0

Choose a tag to compare

@fchastanet fchastanet released this 05 Apr 10:42

[✨feat][tools]: Add diagram, image processing, and cspell tools with improved linting

Introduce krokiWrapper for diagram conversion, rimageWrapper for image processing, and cspellForbidden for forbidden word linting. Enhance plantuml with file download and ELK support, update ShellCheckLint to systematically lint all files, and upgrade pre-commit configuration with hugoUpdateLastmod hook.

✨ New Features

krokiWrapper - Diagram Conversion

  • Implement krokiWrapper command to convert diagrams (PlantUML, Mermaid, Graphviz) to images (SVG, PNG, PDF)
  • Add docker-compose.yml for managing Kroki services (Gateway, Mermaid, BPMN, Excalidraw)

cspellForbidden - Forbidden Words Linting

  • Implement cspellForbidden command to lint files against .cspell/forbidden.txt
  • Create .cspell/forbidden.txt with user prompts if it does not exist
  • Dynamically update cspell configuration based on the presence of the forbidden words file

plantuml Enhancements

  • Introduce File::downloadFile function with curl/wget fallback
  • Add --elk option to enable downloading and using the ELK jar with automatic caching
  • Implement automatic re-download logic for cached ELK jar (older than one month)
  • Support multiple include paths via --include-paths

rimageWrapper - Image Processing

  • Implement bin/rimageWrapper script for image processing commands
  • Add pre-commit hook for rimage-based image generation
  • Support multiple image formats with automatic tool installation checks

🔧 Configuration & Infrastructure

  • Update cspell.yaml to include the new forbidden dictionary
  • Ensure .cspell/forbidden.txt is ignored by git to prevent accidental commits
  • Define command structure in rimageWrapper-binary.yaml for handling various image formats
  • Implement option parsing and error handling in rimageWrapper-options.sh
  • Change bash-tools-framework version from 6.2.5 to 6.2.9
  • Add hugoUpdateLastmod hook to pre-commit stage
  • Update ShellCheckLint to systematically lint all files

📄 Documentation

  • Add help documentation for krokiWrapper, cspellForbidden, and rimageWrapper commands
  • Update Commands.tmpl.md with new command usage instructions
  • Update pre-commit-hooks.md to include rimage hook details
  • Update command help and usage documentation for new options
  • Include error handling and logging improvements for better user feedback

Full Changelog: 6.2.9...6.3.0

6.2.9

Choose a tag to compare

@fchastanet fchastanet released this 29 Mar 19:47

✨(hugo): Add hugoUpdateLastmod pre-commit hook for frontmatter updates
Introduce a new pre-commit hook, hugoUpdateLastmod, to automatically update the lastmod field in Hugo frontmatter based on git modification dates or the current date. This ensures that content is always up-to-date with the latest modification dates.

1. ✨ New Feature: hugoUpdateLastmod Hook

  • Implemented hugoUpdateLastmod to update frontmatter fields in markdown files.
  • Supports two modes: migration mode (--init) for all git-tracked files and commit mode (--commit) for staged files.
  • Includes smart update detection to prevent unnecessary changes.

2. 🔧 Files Affected

  • content/docs/pre-commit-hooks.md: Updated documentation to include the new hook.
  • src/_binaries/hugoUpdateLastmod/hugoUpdateLastmod-binary.yaml: Added configuration for the new hook.
  • src/_binaries/hugoUpdateLastmod/hugoUpdateLastmod-main.sh: Main script for processing markdown files.
  • src/_binaries/hugoUpdateLastmod/hugoUpdateLastmod-options.sh: Added option handling for the new hook.

3. 🛠️ Benefits

  • Automates the management of Hugo frontmatter metadata, improving content accuracy and reducing manual updates.

4. 📄 Documentation

  • Updated documentation to reflect the addition of the hugoUpdateLastmod hook and its usage.

5. ✅ Reviewer Checklist

  • Ensure the hook works as expected in both modes.
  • Verify documentation clarity and completeness.

6.2.8

Choose a tag to compare

@fchastanet fchastanet released this 15 Mar 12:06

🔧✨🐛(mermaid, plantuml, docs, hooks): Update Diagram Tools, Error Handling, and Pre-commit Docs

Update Mermaid and PlantUML command options, improve error handling for file processing, and add documentation for pre-commit hooks. Enhance user feedback and maintain code quality.

1. 🔧 Diagram Tool Updates

  • Update PlantUML version from 3.0 to 3.1 in configuration files and command output.
  • Change Mermaid CLI option from --outputFormat to --format for consistency.
  • Refactor argument handling in mermaid-options.sh for improved option parsing.

2. 🐛 Error Handling Improvements

  • Add checks in mermaid-main.sh and plantuml-main.sh to handle cases where no files are provided.
  • Display clear, informative messages when no files are detected in the repository.
  • Enhance user feedback and command reliability for diagram processing.

3. 🛠️ Docker Image Handling

  • Log information when pulling the latest PlantUML Docker image.
  • Ensure the latest image is pulled if necessary for up-to-date processing.

4. ✨ Documentation

  • Add new documentation for pre-commit hooks, detailing available hooks and usage.
  • Update README and index files to include links to pre-commit hooks documentation.
  • Ensure documentation reflects changes in command usage and options.

5. 🔧 Pre-commit Hooks

  • Fix Mermaid converter types for pre-commit hook configuration.
  • Provide usage instructions for integrating hooks into .pre-commit-config.yaml.

Full Changelog: 6.2.6...6.2.8

6.2.6

Choose a tag to compare

@fchastanet fchastanet released this 14 Mar 22:54

✨🔧(mermaid,docs,infra): Add Mermaid diagram command, update docs, and improve workflows

Introduce Mermaid diagram generation command with pre-commit integration, update documentation links and structure, enhance funding and workflow configs, and refactor PlantUML include path handling.

1. ✨ Features

  • Add bin/mermaid command for generating Mermaid diagrams from .mmd files.
  • Support output formats: svg, png, pdf, with options for output directory.
  • Integrate pre-commit hook to auto-generate Mermaid diagrams before commits.
  • Add pre-build script for vendor installation and documentation generation.

2. 🔧 Configuration & Refactoring

  • Create mermaid-binary.yaml and mermaid-options.sh for command behavior and options.
  • Refactor documentation URLs to use devlab.top and bash-tools-framework.devlab.top for consistency.
  • Update funding configuration and buy_me_a_coffee link.
  • Update commit-status-updater workflow conditions and action references.

3. 🖥️ Script Implementation

  • Implement mermaid-main.sh for Mermaid file conversion and git file detection.
  • Improve error handling for incompatible options and CI error messages in plantuml-main.sh.

4. 📄 Documentation

  • Migrate documentation from Docsify to Hugo/Docsy, restructure content and templates.
  • Add and update documentation for Mermaid and PlantUML commands, including help texts.
  • Update README with consistent links and improved notes.
  • Remove obsolete Docsify files and templates, add new Hugo templates.

5. 🛠️ Tooling

  • Migrate from MegaLinter v8 to v9 for enhanced linting and CI.
  • Add and update shell documentation generation scripts for better index handling.

6. 🖌️ UI/Theme

  • Set Docsy primary color to purple for documentation site.

7. 🐛 Bug Fixes

  • Fix file removal logic in shell doc generation scripts.
  • Update error messages for clarity in CI mode.

8. 💥 Breaking Changes

  • Remove deprecated Docsify files and FrameworkFullDoc.tmpl.md; update scripts and references as needed.

Co-authored-by: François Chastanet 237869+fchastanet@users.noreply.github.com

Full Changelog: 6.2.5...6.2.6

6.2.5

Choose a tag to compare

@fchastanet fchastanet released this 01 Mar 20:28

What's Changed

  • 🔧(plantuml): disable metadata in PlantUML generated images. Avoiding unecessary changes to be committed.
  • Add Copilot agent onboarding instructions by @Copilot in #127
  • lint fixes by @bash-tools-framework[bot] in #129

Full Changelog: 6.2.4...6.2.5