Skip to content

Feat/cli filehashr - #409

Merged
Tejas-Santosh-Nalawade merged 2 commits into
acesdit:mainfrom
bavi404:feat/cli-filehashr
Oct 31, 2025
Merged

Feat/cli filehashr#409
Tejas-Santosh-Nalawade merged 2 commits into
acesdit:mainfrom
bavi404:feat/cli-filehashr

Conversation

@bavi404

@bavi404 bavi404 commented Oct 31, 2025

Copy link
Copy Markdown

Description

Adds a new CLI mini-project FileHashr - a simple command-line tool to generate cryptographic hashes for files or standard input.

What's Included

  • filehashr.py: Python CLI tool that computes SHA256, SHA1, or MD5 hashes
  • README.md: Complete documentation with usage examples and contributor tag

Features

  • ✅ Hash files or read from stdin
  • ✅ Support for multiple algorithms (sha256, sha1, md5)
  • ✅ Streams large files efficiently (1MB chunks)
  • ✅ Optional filename labeling in output
  • ✅ No external dependencies (uses Python standard library only)

Usage Examples

# Hash a file with default SHA256
python3 filehashr.py path/to/file.txt

# Use MD5 algorithm
python3 filehashr.py --algo md5 file.txt

# Read from stdin
echo "hello" | python3 filehashr.py -a sha1

# Include filename in output
python3 filehashr.py --label file.txt

Requirements

  • Python 3.8+
  • No external dependencies (uses only hashlib, argparse, pathlib)

Project Structure

FileHashr/
├── README.md       # Project documentation with contributor tag
└── filehashr.py    # Main CLI implementation

Testing

The script has been tested with:

  • Various file sizes (small to large)
  • Different hash algorithms
  • Standard input piping
  • Error handling for missing files

Contributor Tag

✅ Contributor tag properly included in README.md as: **Contributor:** bavi404


Domain: CLI
Type: Mini Project
Difficulty: Beginner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants