Created
July 14, 2014 11:35
-
-
Save AdamNaj/c89f6c1445efe11ae13a to your computer and use it in GitHub Desktop.
Create Documentation templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DocumentationFolder = "C:\Projects\sitecorepowershell\Trunk\Documentation" | |
$documented = Get-ChildItem $DocumentationFolder | % { $_.BaseName } | |
$undocumented = get-command | ? { $_.DLL -match "Cognifide"} | ? { "$($_.Verb)-$($_.Noun)" -Notin $documented } | %{ "$($_.Verb)-$($_.Noun)" } | |
$undocumented | % { | |
$fileName = "$DocumentationFolder\$_.TODO.ps1" | |
if(Test-Path $fileName){ | |
remove-item $filename | |
} | |
New-Item $fileName -Type File | | |
Set-Content -Value @" | |
<# | |
.SYNOPSIS | |
$_. | |
.DESCRIPTION | |
$_. | |
.PARAMETER Path | |
Path to the item that should be published - can work with Language parameter to narrow the publication scope. | |
.PARAMETER Id | |
Id of the item that should be published - can work with Language parameter to narrow the publication scope. | |
.INPUTS | |
Sitecore.Data.Items.Item | |
.OUTPUTS | |
Sitecore.Data.Items.Item | |
.NOTES | |
Help Author: Adam Najmanowicz, Michael West, Michael Reynolds | |
.LINK | |
https://github.com/SitecorePowerShell/Console/ | |
.EXAMPLE | |
PS master:\> $_ -Path master:\content\home | |
#> | |
"@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty slick!