Single-file, stdlib-only CLI that writes the CSV format WinDirStat's CsvLoader accepts (parent-before-child rows, subtree totals, localized headers for all 25 UI languages). Includes install.sh, pyproject entry point, unit tests and a generator for the language table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
559 B
Bash
Executable File
15 lines
559 B
Bash
Executable File
#!/bin/sh
|
|
# Install wdsexport as a single executable file (no dependencies beyond python3).
|
|
# Usage: ./install.sh [PREFIX] default PREFIX: ~/.local (installs to PREFIX/bin/wdsexport)
|
|
set -eu
|
|
prefix="${1:-$HOME/.local}"
|
|
src="$(cd "$(dirname "$0")" && pwd)/wdsexport.py"
|
|
command -v python3 >/dev/null || { echo "python3 not found" >&2; exit 1; }
|
|
mkdir -p "$prefix/bin"
|
|
install -m 755 "$src" "$prefix/bin/wdsexport"
|
|
echo "installed $prefix/bin/wdsexport"
|
|
case ":$PATH:" in
|
|
*":$prefix/bin:"*) ;;
|
|
*) echo "note: $prefix/bin is not on your PATH" >&2 ;;
|
|
esac
|