Skip to content
/ slbsl Public

📎 Convert paths from Windows to UNIX and vice versa.

Notifications You must be signed in to change notification settings

cb109/slbsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slbsl

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).

Installation

pip install slbsl

Dependencies

pyperclip for clipboard functionality.

Tests

You need pytest installed.

py.test test_slbsl -v

Usage

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.

Why the stupid name?

sl ash b ack sl ash

About

📎 Convert paths from Windows to UNIX and vice versa.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages