Skip to main content

A collection of personal convenience utilities

Project description

desertislandutils

A collection of personal convenience utilities for managing parallel directory structures and ISO week numbers. Written in Python because it's far better than shell scripting!

Installation

Install globally using uv:

uv tool install desertislandutils

Update to the latest version:

uv tool upgrade desertislandutils

The Utils

toobigdatadoc (too)

Manage parallel directory structures for separating text files from large binary files and datasets. Creates symlinked folders under HOME/{toobig|toodata|toodoc}:

  • toobig - Large files excluded from backups
  • toodata - Small-ish data files
  • toodoc - Binary files like PDFs and images
$HOME
    |-- toobig
        |-- # replicated folder paths with large files here, assume not to be backed up
    |-- toodata
        |-- # small-ish data files in support of the parallel root
    |-- toodoc
        |-- # usually pdfs or image files

Usage:

too --help

usage: too [-h] {big,data,doc}

Create symlinked parallel folders under HOME/{toobig|toodata|toodoc}, to
contain data/binary files outside of git repo or away from source/text files.

positional arguments:
  {big,data,doc}  large files to exclude from backup, smallish datasets,
                  binary files like pdf

options:
  -h, --help      show this help message and exit

weeknumber (wn)

Get ISO year week numbers in YYYY-WDD format. Default weekend day is Saturday.

Usage:

wn --help

 Usage: wn [OPTIONS] [DATE]                                                     
                                                                                
 ISO year week number of a date as YYYY-"W"WW. Default weekend day is Saturday.
                                                                                
 Example:                                                                       
                                                                                
 $> wn 'Jul 22 2020' --last                                                     
                                                                                
 2020-W29                                                                       
                                                                                
╭─ Arguments ────────────────────────────────────────────────────────────────╮
│   date      [DATE]  A text expression of date, ex: 'November 27', or      │
│                     2112-07-29. Default is today's in current TZ.          │
│                     [default: (dynamic)]                                   │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --sunday              Week end is Saturday by default, this flag sets     │
│                       Sunday weekend day (ISO standard).                   │
│ --last                Give week number of most recently completed week    │
│                       (overrides DATE argument).                           │
│ --verbose      -v     Full parsed date details for verification.          │
│ --install-completion  Install completion for the current shell.           │
│ --show-completion     Show completion for the current shell, to copy it   │
│                       or customize the installation.                       │
│ --help                Show this message and exit.                          │
╰────────────────────────────────────────────────────────────────────────────╯

Examples:

# Get current week number
wn

# Get week number for a specific date
wn 'Jul 22'

# Get last completed week number
wn --last

# Parse a specific date with details
wn 'November 27 2024' --verbose

Development

Built with modern Python tooling:

  • Build system: uv
  • Deploy: PyPI via GitHub Actions CI/CD
  • Package manager: uv

Setup

# Clone the repository
git clone https://github.com/mahiki/desertislandutils.git
cd desertislandutils

# Install dependencies (including dev extras)
uv sync --all-extras

Testing

# Run tests
just test

# Or directly with uv
uv run --extra test pytest --disable-warnings --verbose

Local Development

# Run commands directly from source
uv run wn --help
uv run too --help

Project Tasks

See the justfile for available commands:

just --list

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

desertislandutils-0.4.3.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

desertislandutils-0.4.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file desertislandutils-0.4.3.tar.gz.

File metadata

  • Download URL: desertislandutils-0.4.3.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for desertislandutils-0.4.3.tar.gz
Algorithm Hash digest
SHA256 dd837adce0d99eecc91e934bfd6919bc36ae31cf3db2ee9e5427cf62b7fb38d1
MD5 74de1de6640cb365f5b0e64ec26d0ca2
BLAKE2b-256 445875de44939291bede600810f134e4810011e099f5005ec85db0197b81b5d7

See more details on using hashes here.

File details

Details for the file desertislandutils-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: desertislandutils-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for desertislandutils-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06097e29c9df35be35bb2482de279ce1071c6f2a609c4b21b4e6180d72d4a4bc
MD5 bff45924f2cb1c7d37d7d144b56b4505
BLAKE2b-256 014aafd2ebc5d814d729e6c73d86c855ce4d55cfcdbae9b3e40e311544d5c9ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page