git @ Cat's Eye Technologies realpath / master
master

Tree @master (Download .tar.gz)

realpath

Version 1.0-2022.0908 | Entry @ catseye.tc | See also: ellsynctagfarmshelf


This is Cat's Eye Technologies' realpath, a simple command-line tool that resolves relative file paths to absolute ones. It:

  • is written in Python 3 (tested with 3.8.10)
  • is small and has no dependencies besides Python
  • is in the public domain (see UNLICENSE)
  • is trivial
  • is not feature-compatible with GNU realpath
  • has no build/install system; either copy it to somewhere on your search path, or alter your search path to include the script directory in this repo, or use some system that solves this problem, like shelf.

Usage

realpath PATH
  • realpath_1 — GPL'ed, and contains an unbuildable C version (nested comments) and an incompatible Perl version of realpath.
  • dtjm/realpath — claims to be "public domain" but is restricted to "non-profit use", which in my IANAL opinion is a contradiction in terms.