npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

super-dee-duper

v0.0.3

Published

A tool for finding and managing duplicate files

Downloads

20

Readme

Super Dee Duper

A powerful tool for finding and managing duplicate files with both CLI and web interfaces.

Features

  • Find duplicate files using secure hash comparison
  • Interactive web interface for managing duplicates
  • Console output for quick scanning
  • Batch rename capabilities
  • File preview support
  • Dark mode support
  • Space savings analysis
  • File type filtering
  • Test file generation for development

Installation from npm (recommended)

npm install --global super-dee-duper

Install fron github

# Clone the repository
git clone https://github.com/johnhenry/super-dee-duper
cd super-dee-duper
# Install dependencies
npm install
# Link
npm link

Usage

Command Line Interface

  1. Scan for duplicates:
# Scan current directory
super-dee-duper scan

# Scan specific directory recursively
super-dee-duper scan ./test-dir -r

# Show results in console instead of web interface
super-dee-duper scan ./test-dir -r -n
  1. Generate test files (for development/testing):
# Generate test files with default settings
super-dee-duper generate-test

# Generate specific number of files with duplicates
super-dee-duper generate-test ./test-dir -c 10 -d 2

CLI Options

  • scan [dir] - Scan directory for duplicates (default: current directory)

    • -r, --recursive - Scan directories recursively
    • -n, --no-web - Show results in console instead of web interface
    • -p, --port <number> - Specify port for web interface (default: 8080)
  • generate-test [dir] - Generate test files

    • -c, --count <number> - Number of unique files to generate (default: 20)
    • -d, --duplicates <number> - Number of duplicates per file (default: 2)

Web Interface

The web interface provides an interactive way to manage duplicate files:

  1. View Duplicates

    • Files are grouped by content
    • Each group shows file size and hash
    • Collapsible groups for better organization
  2. File Management

    • Preview files (images and text)
    • Rename files individually
    • Batch rename with patterns:
      • {n} - Original filename
      • {i} - Index number
      • {ext} - File extension
  3. Filtering

    • Filter by file path
    • Filter by file size
    • Filter by file type
  4. Statistics

    • Total number of duplicate groups
    • Total number of files
    • Total size
    • Potential space savings

Development

Running Tests

# Run tests once
npm test

# Run tests in watch mode
npm run test:watch

Test File Generation

Generate test files for development:

# Generate in test-dir
npm run generate

# Or specify custom parameters
super-dee-duper generate-test ./test-dir -c 10 -d 2

Project Structure

super-dee-duper/
├── cli.mjs              # Command line interface
├── scanner.mjs          # Core duplicate scanning logic
├── web-interface.mjs    # Web interface server
├── console-output.mjs   # Console output formatting
├── generate-test-files.mjs  # Test file generator
├── public/             # Web interface static files
│   └── index.html      # Web interface frontend
└── tests/              # Test files
    └── scanner.test.mjs # Scanner unit tests

Example Workflow

  1. Generate some test files:
super-dee-duper generate-test ./test-dir -c 5 -d 2
  1. Scan for duplicates with web interface:
super-dee-duper scan ./test-dir -r
  1. Open your browser to http://localhost:8080 to manage duplicates

  2. Or view results in console:

super-dee-duper scan ./test-dir -r -n