|
|
3 years ago | |
|---|---|---|
| src/transpose | 3 years ago | |
| tests | 3 years ago | |
| .flake8 | 3 years ago | |
| .gitignore | 3 years ago | |
| .pre-commit-config.yaml | 3 years ago | |
| LICENSE | 3 years ago | |
| README.md | 3 years ago | |
| pyproject.toml | 3 years ago | |
A tool for moving and symlinking directories to a central location
I've been using linux as my main machine for a while and wanted a central directory to backup as backing up my entire HOME directory was a mess. I found moving directories and symlinking worked great. I created a simple project when learning python (I called symlinker) and used it for a while but found it annoying to configure and work with.
I recently found I could use a tool like this for a SteamDeck and decided to start from scratch with better code and easier to use.
This is the current result, although it still needs a lot of work as I'm sure I'm not doing things particularly well.
Additionally, the name transpose was sort of chosen at random and has no particular meaning currently. I'd like to change it in the future but haven't really come up with any suitable replacement.
Can be installed via pip. For instance, from within a virtualenv:
python -m venv .venv
. .venv/bin/activate
pip install .
There are a few environment variables that can be defined to override defaults
TRANSPOSE_STORE_PATH="$XDG_DATA_HOME/transpose"
TRANSPOSE_CACHE_FILENAME=".transpose.json"
Storing a directory will:
target to $STORE_PATH/{name}target to $STORE_PATH/{name}$STORE_PATH/{name}/.transpose.json to store the original target pathtranspose store "My Documents" /home/user/Documents
The above will (assuming using all the defaults):
/home/user/Documents to $XDG_DATA_HOME/transpose/My Documents/home/user/Documents to $XDG_DATA_HOME/transpose/My DocumentsRestoring a directory will:
original_path of the cache file, $STORE_PATH/{name}/.transpose.jsonoriginal_pathtranspose restore "/home/user/.local/share/transpose/My Documents"
The above will (assuming all the defaults):
/home/user/Documents (from cache file)$XDG_DATA_HOME/transpose/My Documents to /home/user/DocumentsThis will recreate the symlink based on the cache file within the directory.
This is most useful when moving the stored directory.
transpose apple "/home/user/.local/share/transpose/My Documents"