rustedbytes-randstuff

Crates.iorustedbytes-randstuff
lib.rsrustedbytes-randstuff
version0.2.0
created_at2025-10-11 10:21:06.845555+00
updated_at2025-10-11 10:21:06.845555+00
descriptionRust CLI tool for generating random junk files and folders with various content themes
homepagehttps://github.com/mad4j/rustedbytes-randstuff
repositoryhttps://github.com/mad4j/rustedbytes-randstuff
max_upload_size
id1878053
size62,875
Daniele Olmisani (mad4j)

documentation

https://github.com/mad4j/rustedbytes-randstuff

README

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:

cargo build --release

The binary will be available at target/release/randstuff

Usage

Generate a single file

# 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

# 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

# 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
  • 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.

Commit count: 0

cargo fmt