diff --git a/docs/artefacts/smash-v0.0.8-demo.gif b/docs/artefacts/smash-v0.0.8-demo.gif new file mode 100644 index 0000000..065585c Binary files /dev/null and b/docs/artefacts/smash-v0.0.8-demo.gif differ diff --git a/docs/artefacts/smash-v0.0.8-hdd-photos-demo.gif b/docs/artefacts/smash-v0.0.8-hdd-photos-demo.gif new file mode 100644 index 0000000..6edb728 Binary files /dev/null and b/docs/artefacts/smash-v0.0.8-hdd-photos-demo.gif differ diff --git a/docs/demos.md b/docs/demos.md index 445f48a..e044f59 100644 --- a/docs/demos.md +++ b/docs/demos.md @@ -3,10 +3,12 @@ Pre-recorded demos of `smash` in action. # Examples +* [v0.0.8-hdd-photos](https://vhs.charm.sh/vhs-6tlEMMcnwSWSXQtHzD2fEU.gif) - `smash`ing an old portable USB HDD of photos & removing duplicates. * [v0.0.7-hdd-photos](https://vhs.charm.sh/vhs-4OwN0BJfb3F3CTzGJCFHcs.gif) - `smash`ing an old portable USB HDD of photos & removing duplicates. * [v0.0.5-hdd-photos](https://vhs.charm.sh/vhs-7B6XHxXq8VPvZ6AY9FpGIc.gif) - `smash`ing an old portable USB HDD of photos with excluded directories. # Versions +* [v0.0.8](https://vhs.charm.sh/vhs-7BJdHGJLipNTwKQjJjDhXV.gif) - powered by [VHS](https://vhs.charm.sh) * [v0.0.7](https://vhs.charm.sh/vhs-5uZbZAvk8Y6eq4dihLppbk.gif) - powered by [VHS](https://vhs.charm.sh) * [v0.0.5](https://vhs.charm.sh/vhs-1zSMi9vYpmh0DivoB4E6g4.gif) - powered by [VHS](https://vhs.charm.sh) * [v0.0.4](https://vhs.charm.sh/vhs-tgMXNRqo7UovLRd5iSlgF.gif) - powered by [VHS](https://vhs.charm.sh) diff --git a/docs/vhs/demo-photos-hdd.tape b/docs/vhs/demo-photos-hdd.tape index aef032c..966f0f3 100644 --- a/docs/vhs/demo-photos-hdd.tape +++ b/docs/vhs/demo-photos-hdd.tape @@ -13,6 +13,11 @@ Set WindowBar Colorful Set Theme "TokyoNight" # smash Linux/drivers +Type "# In this demo, we're using a slow USB SATA 2.5inch disk with photos" +Enter +Type "# but we want to ignore sort, tmp & events folders in the collection" +Enter +Sleep 1s Type "./smash /media/thushan/smash/photos/ --exclude-dir=sort,tmp,events -o report.json" Sleep 500ms Enter @@ -20,14 +25,27 @@ Sleep 30s Type "clear" Sleep 500ms Enter +Type "# So let's see the main files that were duplicated:" +Enter +Sleep 1s Type `jq '.analysis.dupes[]|[.location,.path,.filename]|join("/")' report.json` Sleep 500ms Enter +Sleep 2s +Type "# and now the duplicates:" +Enter +Sleep 1s +Type `jq '.analysis.dupes[].duplicates[]|[.location,.path,.filename]|join("/")' report.json` +Sleep 500ms +Enter Sleep 5s Type "clear" Sleep 500ms Enter -Type `jq '.analysis.dupes[]|[.location,.path,.filename]|join("/")' report.json | xargs ls -lh` +Type "# You could now remove the files but let's just list the filesizes for now:" +Enter +Sleep 1s +Type `jq '.analysis.dupes[].duplicates[]|[.location,.path,.filename]|join("/")' report.json | xargs exa -lh --no-user --no-permissions` Sleep 500ms Enter Sleep 5s diff --git a/docs/vhs/demo.tape b/docs/vhs/demo.tape index 00d812a..6d960aa 100644 --- a/docs/vhs/demo.tape +++ b/docs/vhs/demo.tape @@ -13,6 +13,11 @@ Set WindowBar Colorful Set Theme "JetBrains Darcula" # smash Linux/drivers +Type "# Let's start by de-duping the linux source tree," +Enter +Type "# exlude the git dir and saving to report.json!" +Enter +Sleep 1s Type "./smash ~/linux/drivers --exclude-dir=git -o report.json" Sleep 500ms Enter @@ -20,22 +25,34 @@ Sleep 10s Type "clear" Sleep 500ms Enter -Type `jq '.analysis.dupes[]|[.location,.path,.filename]|join("/")' report.json | xargs wc -l` +Type "# Now let's look at only the duplicate files" +Enter +Sleep 1s +Type `jq '.analysis.dupes[].duplicates[]|[.location,.path,.filename]|join("/")' report.json | xargs wc -l` Sleep 500ms Enter Sleep 5s -Type `jq '.analysis.dupes[]|[.location,.path,.filename]|join("/")' report.json | xargs rm` +Type "# *gulp* let's remove them duplicates, shall well?" +Enter +Sleep 1s +Type `jq '.analysis.dupes[].duplicates[]|[.location,.path,.filename]|join("/")' report.json | xargs rm` Sleep 500ms Enter Sleep 5s +Type "# Okay, let's just double check they got removed" +Enter +Sleep 1s Type "cd ~/linux/drivers" Sleep 500ms Enter -Sleep 2s +Sleep 1s Type "git status -s" Sleep 500ms Enter Sleep 3s +Type "# Alright, let's reset this for gits & giggles..." +Enter +Sleep 1s Type "git reset --hard" Sleep 500ms Enter diff --git a/readme.md b/readme.md index e902c4a..99212ea 100644 --- a/readme.md +++ b/readme.md @@ -15,13 +15,13 @@ Amongst the highlights of `smash`: * Supports a variety of non-cryptographic algorithms (see [algorithms supported](./docs/algorithms.md)). * Read-only view of the underlying filesystem when analysing * Reports on duplicate files & empty (0 byte) files -* Outputs a report in json, you can use tools like [jq](https://github.com/jqlang/jq) to operate on (see [examples](#examples) below or [this vhs tape](https://vhs.charm.sh/vhs-4OwN0BJfb3F3CTzGJCFHcs.gif)) +* Outputs a report in json, you can use tools like [jq](https://github.com/jqlang/jq) to operate on (see [examples](#examples) below or [the vhs tapes](./docs/demos.md)) * Used to dedupe multi-TB of astrophysics datasets, images and video content & run regularly to report duplicates `smash` does not support pruning of duplicates or empty files natively and it's encouraged you vet the output report before pruning via automated tools.

- Made with VHS
+ Made with VHS
Find duplicates in the linux/drivers source tree with smash (see our 🍿 other demos). Made with vhs!