https://github.com/chadnpc/clihelper.xconvert

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

https://github.com/chadnpc/clihelper.xconvert

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary

Keywords from Contributors

hack bruteforce
Last synced: 11 months ago · JSON representation

Repository

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

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License

Readme.md

✖convert

✖convert - version 0.1.9

AIO module for bidirectional data transformations across multiple encoding formats and native object structures, eliminating dependency on multiple conversion utilities.

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

↯ Install

PowerShell 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:

```PowerShell "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

```PowerShell $enc_Pass = "HelloWorld" | xconvert ToBase32, ToObfuscated, ToSecurestring

then reverse it:

$txtPass = $encPass | xconvert ToString, FromObfuscated, FromBase32, ToUTF8str $txt_Pass | Should -Be "HelloWorld"

Metal 🔥 ⚡︎ 🤘

```

Some still wip:

ғᴀᴏ̨ (‘•.•’): 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](https://learn.microsoft.com/en-us/powershell/scripting/lang-spec/chapter-06?view=powershell-7.4), users may find limited built-in support for less common file types, necessitating additional modules. `Example`: Converting excel Files often result in [corrupted files](https://forums.powershell.org/t/converting-excel-files-in-powershell/10807). 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.

Contributions are welcome.

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

  • [x] Added main class (90%) 🎉.
  • [ ] New methods to xconvert class: For each method you add there should be counter-method for it. There's a lot of missing methods, or new ways to do things. you just have to look for them. For example:
    • ToBase32 💱 FromBase32

You can get a quick overview by running show-MethodsOverview:

PowerShell #Requires -Modules cliHelper.xconvert function show-MethodsOverview() { $mark = @{ True = "✅"; False = "😒"} $xmethods = [xconvert].GetMethods().Where({ $_.IsStatic -and !$_.IsHideBySig }).name | Sort-Object -Unique; $analysis = $xmethods | % { $_.Replace('To', "").Replace('From', "") } | Sort-Object -Unique | Select-Object @{l="Name"; e={$_} }, @{l='HasBoth'; e={ $xmethods -contains "To$_" -and $xmethods -contains "From$_" }}; $hasBoth = $analysis.Where({ $_.HasBoth }); $doesNotHaveBoth = $analysis.Where({ !$_.HasBoth }); Write-Host "`nOverview of all static methods for [xconvert]" -f Green; ($hasBoth + $doesNotHaveBoth) | Select-Object Name, @{l="To"; e={ $mark[[string]($xmethods -contains "To$($_.Name)")] }}, @{l="From"; e={ $mark[[string]($xmethods -contains "From$($_.Name)")] } } | Format-Table } - [x] Added Private /utility classes - [x] Add Public function(s)

Note: This module intentionally uses 1 huge main class. Creating all functions for each method in [xconvert] might get tedious overtime, so only functions for Common format conversions will be created. i.e: - [x] Ansi - [x] ASCIIstr - [x] Base32 - [x] Base58 - [x] Base64str - [x] Base85 - [x] BitArray - [x] BUnicodestr - [x] Bytes - [x] Caesar - [x] Compressed - [x] Csv - [x] HexString - [x] Int32 - [x] Latin1str - [x] Obfuscated - [x] Object - [x] Polybius - [x] Protected - [x] PSObject - [x] ROT13 - [x] Unicodestr - [x] UtcDate - [x] UTF32str - [x] UTF7str - [x] UTF8str - [x] JSON-CSV - [ ] JSON-XML - [ ] JSON-Log - [x] Markdown-HTML - [ ] Powershell-Batch - [ ] Word-Pdf (why not) - [ ] Hex-RGB - [ ] Bitmaps - [x] Roman-Numbers - [X] GUID - [x] Url-encoding - [ ] DecimalIPv4 - [ ] functions convert data type to another (string, integer, datetime ...) - [x] functions to convert encodings (ASCII, UTF-8, base32 ...) - [ ] Binary manipulation - [ ] audio-video conversion (why not) - [ ] functions to convert between visualization formats - [ ] Write tests for encoder/decoder utility classes (they work. trust me bro)

  • [ ] Add/improve a github workflows

Contributors

Thank you.

Alt

Owner

  • Name: alain
  • Login: chadnpc
  • Kind: user

GitHub Events

Total
  • Push event: 9
Last Year
  • Push event: 9

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 98
  • Total Committers: 3
  • Avg Commits per committer: 32.667
  • Development Distribution Score (DDS): 0.265
Past Year
  • Commits: 98
  • Committers: 3
  • Avg Commits per committer: 32.667
  • Development Distribution Score (DDS): 0.265
Top Committers
Name Email Commits
Alain Herve a****c@g****m 72
Alain Herve a****n@a****v 25
ImgBotApp I****p@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/CI.yaml actions
  • actions/checkout v3 composite
.github/workflows/Delete_old_workflow_runs.yaml actions
  • Mattraks/delete-workflow-runs v2 composite
.github/workflows/Publish.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite