https://github.com/JamesWTruher/PsFormattingTools
Useful formatting tools for PowerShell
https://github.com/JamesWTruher/PsFormattingTools
Last synced: 4 months ago
JSON representation
Useful formatting tools for PowerShell
- Host: GitHub
- URL: https://github.com/JamesWTruher/PsFormattingTools
- Owner: JamesWTruher
- Created: 2015-10-29T18:37:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-06T22:31:52.000Z (over 5 years ago)
- Last Synced: 2024-12-03T10:24:21.847Z (4 months ago)
- Language: PowerShell
- Size: 12.7 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - JamesWTruher/PsFormattingTools - Useful formatting tools for PowerShell (PowerShell)
README
# PsFormatting Tools
This module has a few text processing utilities that I have used over the
past few years### Format-Banner
Do you long for those bygone days when you could create text banners,
well now you can
```PS> format-banner Format Tools -asString
#######
# #### ##### # # ## #####
# # # # # ## ## # # #
##### # # # # # ## # # # #
# # # ##### # # ###### #
# # # # # # # # # #
# #### # # # # # # ########
# #### #### # ####
# # # # # # #
# # # # # # ####
# # # # # # #
# # # # # # # #
# #### #### ###### ####```
### Get-Lorem
Do you need some temp text, I got you covered```
PS> get-lorem -count 32
Laboriosam, veritatis amet, minima consectetur, aut Temporibus assumenda
ullam atque delectus, exercitationem vitae dolor non vol uptate aliqua.
ea in vel dolore eius Ut dolor et Duis et qui cupidatat quibusdam quo esse.```
### Format-String
Would you like to format your string as in a paragraph? Format-String
might do the trick!```
PS> $s = get-lorem -count 32
PS> format-string -width 40 -padw 4 -indent -string $ss
Placeat officiis et Lorem et
qui quia animi, saepe ullamco
tempore, pariatur. qui sapiente aut
consectetur, mollitia occaecat
voluptas pariatur? cupidatat dolore
voluptate dolore ipsum aperiam,
sunt quam harum sit et praesentium
iure ea.```
### New-TableFormat
Having trouble creating format.ps1xml files? New-TableFormat will help, get
your output looking like you want, and then replace format-table with
new-tableformat and use the XML in your format.ps1xml file!```
PS> get-date | format-table date,dayofweekDate DayOfWeek
---- ---------
10/29/2015 12:00:00 AM ThursdayPS> get-date | new-tableformat date,dayofweek
DateTimeTable
System.DateTime
date
dayofweek
date
dayofweek
```