Skip to content

alainQtec/cliHelper.xconvert

Repository files navigation

✖convert

✖convert - version 0.1.3

An all-in-one module to convert files and object types.

Its like the builtin [system.convert] but extended.

↯ Install

Install-Module cliHelper.xconvert

⤷ Straight forward; gets the latest version.

🧑🏻‍💻 ᴜsᴀɢᴇ

Hint: xconvert is pretty much the only cmdlet you have to remember ×͜×

1. (xconvert). Like directly using the class.

  • To know what method to use, you just type xconvert From and

    Tab to see all options.

    xconvert From Tab

    gives this output

    from tab

    or xconvert To Tab

    to tab

Then you can do stuff like:

"HelloWorld" | xconvert ToBase32
# same as
(xconvert)::ToBase32("HelloWorld")

ie: since xconvert is an alias for the public funtion Invoke-Converter.

2. Chain⫘⫘ing and piping public function(s)

ex: do stuff like

$enc_Pass = "HelloWorld" | xconvert ToBase32, ToObfuscated, ToSecurestring
# then reverse it:
$txt_Pass = $enc_Pass | xconvert ToString, FromObfuscated, FromBase32, ToUTF8str
$txt_Pass | Should -Be "HelloWorld"
# Metal 🔥 ⚡︎ 🤘

Advanced? yeah you can get nuts with this cmdlet 🤓

ғᴀᴏ̨ (‘•.•’): Why?!

PowerShell has limited built-in Support for Some Formats.

For me, this is like a fun and AIO solution to extend that functionality.

  • While PowerShell excels at handling common file formats(JSON, XML, CSV) and data types, users may find limited built-in support for less common file types, necessitating additional modules.

    Example: Converting excel Files often result in corrupted files.

The goal is simple, to make [xconvert] the best module to convert objects in powershell.

ʟɪᴄᴇɴsᴇ

This project is licensed under the MIT License. See the ʟɪᴄᴇɴsᴇ file for details.

sᴘᴏɴsᴏʀ?

If this tool saves your time and you want to support me;

You can also share ideas, and provide feedback.

Contributions are really welcome.

⤷ This is still a ᴡɪᴘ 🚧. Yes its usable, but alot of cool stuff are not fully done.

For more, checkout the progress

Contributors

Thank you.

Alt