Convert paths from Windows to UNIX and vice versa.
Written to slightly ease the pain of working in environments that use both like a bash on Windows. Do not pass arbitrary text to the tool, only a path (though it may be wrapped in quotation marks).
pip install slbsl
pyperclip for clipboard functionality.
You need pytest installed.
py.test test_slbsl -v
The package installs a few shell scripts that you can call:
sl [path] : Converts <path> or clipboard content to UNIX convention. bsl [path] : Converts <path> or clipboard content to Windows convention. fsl [path] : Flips slashes in <path> or clipboard content to their opposite individually. esl [path] : Equalizes slashes in <path> or clipboard content depending on the majority. In case of a draw, favors backslashes on Windows and slashes on UNIX.
The result is returned to the commandline and stored additionally in the clipboard.
sl ash b ack sl ash