Skip to main content

dwrap

Directory wrap. Media files often live in eponymous directories (movie (2001)/movie (2001).mkv), but sometimes arrive "naked". dwrap wraps each file you give it in a directory of the same name.

dwrap [--dry-run] [--preserve-extensions] PATH...

Pass files via your shell's glob, e.g. dwrap *.mkv. Arguments that are directories are ignored.

$ dwrap --dry-run "movie (2001).mkv"
movie (2001).mkv -> movie (2001)/movie (2001).mkv

Options

  • --dry-run – show what would happen without changing anything.
  • --preserve-extensions – name the directory after the full file name, including its extension (movie (2001).mkv/movie (2001).mkv). By default the extension is dropped (movie (2001).mkv → movie (2001)/).

Name clashes

If the directory name is already taken (by an existing item, or by an earlier file in the same run), dwrap warns and numbers the new directory: movie (2001) (1), movie (2001) (2), and so on. Nothing is overwritten.

Install

pipx install dwrap

Development

pip install -e . pytest
pytest

Metadata

Release files for dwrap 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dwrap 0.1.0
File Size Uploaded
dwrap-0.1.0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dwrap 0.1.0
File Interpreter ABI Platform
dwrap-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / dwrap-0.1.0.tar.gz

Download URL dwrap-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c1b612471f43483cf1178183e0c06172a766f7ade1b55de0b797d6aaeba6fe18
BLAKE2b-256 checksum
How to use checksums
b7bec1d1fb6d3c8360e164790e8e92d395c73b297d5ffd60d16e46ea005f2dff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / dwrap-0.1.0-py3-none-any.whl

Download URL dwrap-0.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22b832bbe52f4041b0244ca6af1876763a5d5e627d69464ddafdbb5c847b0174
BLAKE2b-256 checksum
How to use checksums
440abb758020b7a519d4b3894584b5c2e1dcf6d3baf6ba3bfaef3f4ef0b7e423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page