psDoc is a Powershell Help Document generator.
To generate documentation off of your module, simply import your module
Import-Module MySpecialModule
And generate the documentation
.\psDoc.ps1 -moduleName MySpecialModule
Powershell Help Document Generator
License: Microsoft Public License
psDoc is a Powershell Help Document generator.
To generate documentation off of your module, simply import your module
Import-Module MySpecialModule
And generate the documentation
.\psDoc.ps1 -moduleName MySpecialModule
Exception is thrown in Update-Progress function:
Exception: Attempted to divide by zero. --> Attempted to divide by zero.
It happens, because $totalCommands is not defined.
$totalCommands = $commandsHelp.Count
Simple fix:
$totalCommands = $commandsHelp.Count
if (!$totalCommands)
{
$totalCommands = 1
}
Hi,
It would be useful to add <# #> block at start of scripts. Maybe filenames could be added to the list of functions.
Regard
Test1 module:
function Invoke-TestCmdlet
{
param
(
[Parameter(Mandatory = $true, HelpMessage = 'Only test.')]
[string] $Path
)
}
.\psDoc.ps1 Test1 -template .\out-html-template.ps1 -fileName Test1.html
http://screencast.com/t/tZxmSQ1FRiT
.\psDoc.ps1 Test1 -template .\out-markdown-template.ps1 -fileName Test1.md
http://screencast.com/t/6Wi2v7V0kR
It happens, because the block is ignored in out-html-template.ps1:
if (!($_.syntax | Out-String ).Trim().Contains('syntaxItem')) {
However, the Markdown implementation works fine.
Hi,
Is there a way to deal with mulitples lines examples ?
For example, a header like this :
<#
.SYNOPSIS
Do Something
.DESCRIPTION
Do Something
.PARAMETER Arg1
Arg1
.PARAMETER Arg2
Arg2
.PARAMETER Arg3
Arg3
.INPUTS
.OUTPUTS
Renvoit la liste de la ou des archive(s) générée(s)
.EXAMPLE
$var = 'Test'
Do-Something -Arg1 $var
Invoke the Do-Something cmdlet with the $var variable
.NOTES
.LINK
#>
When I would like it to look like this :
Regards,
Excellent piece of work sir!
Stalled on this, guessed to create the help
directory, reran and it worked.
out-file : Could not find a part of the path 'C:\Users\dfinke\Downloads\psDoc-master\src\help\index.html'.
At C:\Users\dfinke\Downloads\psDoc-master\src\psDoc.ps1:54 char:1
+ Invoke-Expression $template > "$outputDir\$fileName"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
What's the license for this project?
when I run .\psDoc.ps1 -ModuleName MyModule I get an error:
out-file : Could not find a part of the path 'C:\Users\me\Downloads\psDoc-master\psDoc-master\src\help\index.html'.
At C:\Users\me\Downloads\psDoc-master\psDoc-master\src\psDoc.ps1:54 char:1
+ Invoke-Expression $template > "$outputDir\$fileName"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
bummer
$(FixString($_.code | out-string ))
The code makes indentation for the first line only. All other example text is broken.
Would be great to use in other projects
ie. there is no check to make sure that the module is installed on the system before psdoc is run.
and
if a wildcard is entered at the command line (or 2 modules with the same name are resolved by psmodulepath), all of the commands will be merged into the one output file.
this function will resolve both cases:
function Check-IfModuleExists($modName){
if((Get-Module -ListAvailable -Name $modName).Count -eq 1) {return $true}
else {return $false}
}
happy to send though a pull request with the changes...
Cheers,
Steve R.
Sometimes when the tool generates the navigation on the left, the method names are not in order.
I "thought" I put some sort of order-by clause in there, but maybe I've missed it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.