rustedbytes-randstuff 0.2.0

Rust CLI tool for generating random junk files and folders with various content themes
# rustedbytes-randstuff
Rust CLI tool for generating random junk

## Features

- Generate single files or directories with multiple files
- Multiple content themes:
  - `random`: Random binary data
  - `text`: Lorem Ipsum-style text content
  - `source-code`: Rust-style source code
  - `office`: XML-like office document content
  - `image`: Binary content with PNG-like headers
- Configurable maximum file size
- Automatic file extension based on theme

## Installation

Build from source:
```bash
cargo build --release
```

The binary will be available at `target/release/randstuff`

## Usage

### Generate a single file

```bash
# Generate a random binary file
randstuff --output myfile.bin --theme random --max-size 1024

# Generate a text file
randstuff --output document.txt --theme text --max-size 2048

# Generate a source code file
randstuff --output code.rs --theme source-code --max-size 1500

# Generate an office document
randstuff --output document.xml --theme office --max-size 3000

# Generate an image file
randstuff --output image.png --theme image --max-size 5000
```

### Generate multiple files in a directory

```bash
# Generate 10 random binary files
randstuff --output mydir --theme random --max-size 1024 --count 10

# Generate 5 source code files
randstuff --output src_files --theme source-code --max-size 2048 --count 5
```

### Options

- `-o, --output <OUTPUT>`: Output path (file or directory) - **required**
- `-t, --theme <THEME>`: Content theme (default: `random`)
  - Possible values: `random`, `text`, `source-code`, `office`, `image`
- `-m, --max-size <MAX_SIZE>`: Maximum size in bytes for each file (default: `1024`)
- `-c, --count <COUNT>`: Number of files to generate (for directory mode)

## Examples

```bash
# Generate a single 500KB text file
randstuff -o large.txt -t text -m 500000

# Generate 20 small random files in a folder
randstuff -o junk_folder -t random -m 100 -c 20

# Generate 5 office documents up to 10KB each
randstuff -o documents -t office -m 10240 -c 5
```

## Development

### Releasing

This project uses an automated release workflow. To create a new release:

1. Go to the **Actions** tab in GitHub
2. Select the **Release** workflow
3. Click **Run workflow**
4. Choose the version bump type:
   - `auto` (default): Automatically determines version based on conventional commits
     - Breaking changes (commits with `!` or `BREAKING CHANGE:`) → major version bump
     - New features (`feat:` commits) → minor version bump  
     - Bug fixes (`fix:` commits) → patch version bump
   - `major`: Manually trigger a major version bump (e.g., 1.0.0 → 2.0.0)
   - `minor`: Manually trigger a minor version bump (e.g., 1.0.0 → 1.1.0)
   - `patch`: Manually trigger a patch version bump (e.g., 1.0.0 → 1.0.1)

The workflow will:
- Determine the new version number (0.1.0 if no previous releases exist)
- Update `Cargo.toml` with the new version
- Publish the crate to [crates.io]https://crates.io
- Create a GitHub release with a changelog

**Note**: First release requires a `CARGO_REGISTRY_TOKEN` secret to be configured in the repository settings for publishing to crates.io.

## License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.