Skip to content

Conversation

@macote
Copy link
Owner

@macote macote commented Jun 3, 2025

This update introduces several new features and enhancements based on the initial sections of your TODO.md file:

  1. Overall Progress Display:

    • The creation process now clearly shows the current file and a running byte/percentage count.
    • The verification process provides a detailed completion summary including files checked, errors, missing files, and extra files.
  2. Statistics Reporting:

    • After create, verify, or update operations, the utility now displays:
      • Total number of files processed.
      • Total bytes processed (human-readable format).
      • Total processing time.
      • Average processing speed (human-readable format).
  3. Report Mode:

    • --report-file <PATH>: Allows all output (progress, results, errors) to be logged to a specified file.
    • --silent: Suppresses progress output on the console. When used with --report-file, console output is silenced, but the report file still receives full details.
  4. Checksum File Update Feature:

    • --update (or -x): Enables updating an existing checksum file.
      • New files found in the target directory are added to the checksum file.
      • Files with changed sizes (or modification times, implicitly) are re-hashed and their entries updated.
    • --remove-missing: When in update mode, entries in the checksum file for which files are not found on disk are removed from the checksum file.
    • --force-rehash: When in update mode, all files found on disk that are also in the checksum file will be re-hashed, even if their metadata matches.
    • Checksum saving is now atomic (uses a temporary file and rename) to prevent corruption.

These changes significantly enhance the usability and functionality of the hshchk utility.

This update introduces several new features and enhancements based on the initial sections of your TODO.md file:

1.  **Overall Progress Display:**
    *   The creation process now clearly shows the current file and a running byte/percentage count.
    *   The verification process provides a detailed completion summary including files checked, errors, missing files, and extra files.

2.  **Statistics Reporting:**
    *   After create, verify, or update operations, the utility now displays:
        *   Total number of files processed.
        *   Total bytes processed (human-readable format).
        *   Total processing time.
        *   Average processing speed (human-readable format).

3.  **Report Mode:**
    *   `--report-file <PATH>`: Allows all output (progress, results, errors) to be logged to a specified file.
    *   `--silent`: Suppresses progress output on the console. When used with `--report-file`, console output is silenced, but the report file still receives full details.

4.  **Checksum File Update Feature:**
    *   `--update` (or `-x`): Enables updating an existing checksum file.
        *   New files found in the target directory are added to the checksum file.
        *   Files with changed sizes (or modification times, implicitly) are re-hashed and their entries updated.
    *   `--remove-missing`: When in update mode, entries in the checksum file for which files are not found on disk are removed from the checksum file.
    *   `--force-rehash`: When in update mode, all files found on disk that are also in the checksum file will be re-hashed, even if their metadata matches.
    *   Checksum saving is now atomic (uses a temporary file and rename) to prevent corruption.

These changes significantly enhance the usability and functionality of the hshchk utility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants