PoshCode Archive  Check-in [52b5fa3fd6]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:This script uses the text and XML PowerShell help files to generate HTML help for all PowerShell Cmdlets, PSProviders, and “about” topics. the help topics are compiled into a .chm file using HTML Help Workshop.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:52b5fa3fd676da68bc4544dcc05ac707f3f217502163d873bf55f8af934143d5
User & Date: Jeff Hillman 2018-06-10 14:27:57
Context
2018-06-10
14:27
This is a further preview of what you can do with System.Windows.UIAutomation — The new WASP module is coming… check-in: 69b61e2624 user: Joel Bennett tags: trunk
14:27
This script uses the text and XML PowerShell help files to generate HTML help for all PowerShell Cmdlets, PSProviders, and “about” topics. the help topics are compiled into a .chm file using HTML Help Workshop. check-in: 52b5fa3fd6 user: Jeff Hillman tags: trunk
14:27
Check md5/sha1/etc hashes check-in: 2c26578de2 user: Joel Bennett tags: trunk
Changes

Changes to Compile-Help.ps1.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
....
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# title: Compile-Help
# description: This script uses the text and XML PowerShell help files to generate HTML help for all PowerShell Cmdlets, PSProviders, and “about” topics.  the help topics are compiled into a .chm file using HTML Help Workshop.
# version: 5.4
# type: script
# author: Jeff Hillman
# license: CC0
# function: Html-Encode
# x-poshcode-id: 144
# x-derived-from-id: 1136
# x-archived: 2016-03-22T16:27:56
# x-published: 2008-02-16T22:14:00
#
#
# Compile-Help.ps1
# by Jeff Hillman
#
# this script uses the text and XML PowerShell help files to generate HTML help
# for all PowerShell Cmdlets, PSProviders, and "about" topics.  the help topics 
# are compiled into a .chm file using HTML Help Workshop.
# 
# Minor tweak by John Robbins to work on x64 when looking for HHC.EXE.

param( [string] $outDirectory = ".\PSHelp", [switch] $GroupByPSSnapIn )

function Html-Encode( [string] $value )
{
    # System.Web.HttpUtility.HtmlEncode() doesn't quite get everything, and 
    # I don't want to load the System.Web assembly just for this.  I'm sure 
................................................................................
    }
}

Write-DefaultPage
Write-Css
Write-Hhp

$progDir = "C:\Program Files"
if ( $(Test-Path env:"ProgramFiles(x86)") -eq $True )
{
	$progDir = $(get-item env:"ProgramFiles(x86)").value
}
if ( Test-Path $prodDir + "\HTML Help Workshop\hhc.exe" )
{
    # compile the help
    "`nCompiling the help manual...`n"
    Push-Location
    Set-Location $outDirectory
    & $progDir + "\HTML Help Workshop\hhc.exe" powershell.hhp
    Pop-Location
    
    # open the help file
    & "$outDirectory\PowerShell.chm"
}
else
{
    Write-Host -ForegroundColor Red @"

HTML Help Workshop is not installed, or it was not installed in its default
location of "C:\Program Files [x86]\HTML Help Workshop".

HTML Help Workshop is required to compile the help manual.  It can be downloaded
free of charge from Microsoft:

http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en

If you do not want to install HTML Help Workshop on this machine, all of the







|
<
|
|








<
<







 







<
<
<
<
<
|





|










|







3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20


21
22
23
24
25
26
27
....
1319
1320
1321
1322
1323
1324
1325





1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
# title: Compile-Help
# description: This script uses the text and XML PowerShell help files to generate HTML help for all PowerShell Cmdlets, PSProviders, and “about” topics.  the help topics are compiled into a .chm file using HTML Help Workshop.
# version: 5.4
# type: script
# author: Jeff Hillman
# license: CC0
# function: Html-Encode
# x-poshcode-id: 99

# x-archived: 2016-07-03T16:11:24
# x-published: 2008-01-07T02:53:00
#
#
# Compile-Help.ps1
# by Jeff Hillman
#
# this script uses the text and XML PowerShell help files to generate HTML help
# for all PowerShell Cmdlets, PSProviders, and "about" topics.  the help topics 
# are compiled into a .chm file using HTML Help Workshop.



param( [string] $outDirectory = ".\PSHelp", [switch] $GroupByPSSnapIn )

function Html-Encode( [string] $value )
{
    # System.Web.HttpUtility.HtmlEncode() doesn't quite get everything, and 
    # I don't want to load the System.Web assembly just for this.  I'm sure 
................................................................................
    }
}

Write-DefaultPage
Write-Css
Write-Hhp






if ( Test-Path "C:\Program Files\HTML Help Workshop\hhc.exe" )
{
    # compile the help
    "`nCompiling the help manual...`n"
    Push-Location
    Set-Location $outDirectory
    & "C:\Program Files\HTML Help Workshop\hhc.exe" powershell.hhp
    Pop-Location
    
    # open the help file
    & "$outDirectory\PowerShell.chm"
}
else
{
    Write-Host -ForegroundColor Red @"

HTML Help Workshop is not installed, or it was not installed in its default
location of "C:\Program Files\HTML Help Workshop".

HTML Help Workshop is required to compile the help manual.  It can be downloaded
free of charge from Microsoft:

http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en

If you do not want to install HTML Help Workshop on this machine, all of the