powershell-docset
                                
                                 powershell-docset copied to clipboard
                                
                                    powershell-docset copied to clipboard
                            
                            
                            
                        A dash docset for powershell modules : https://docs.microsoft.com/en-us/powershell/module/
powershell-docset : A dash docset for powershell modules
Status
posh-to-dash.py scrapes the newly announced https://docs.microsoft.com/en-us/powershell/module/ website in order to create an offline dash-compatible archive to be viewed in Dash, Zeal or Velocity :
Releases
- v0.1 -- Minimal working version
- v0.2 -- Offline mode supported
- v0.3 -- travis setup
- v0.4 -- user contributed docset
- v0.5 -- versionned docsets
- v0.6 -- windows 10 modules documentation
- v0.7.2 -- powershell 7.1 documentation
Installation & Execution
posh-to-dash.py relies on :
- requestsfor http(s) downloads
- seleniumand- phantomjsfor webscraping
- bs4for html parsing and rewriting
- Copy the repository
- Install the dependencies from requirements.txt, use a virtualenv to avoid problems with dependencies and versions.
- Download the geckodriver from Mozilla's Repo, download the version that matches your OS.
- Place the geckodriver in your path
- 
If Windows, grab the executable an place it in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps
- 
If Linux, move it to your ~/.local/binor wherever you have your path
- Start scraping by typing : posh-to-dash.py --output=$outputfile --version=6 --temporary
- if --outputis not provided,posh-to-dash.pywill output "Powershell.tgz' into the working directory
- the --versionswitch support only Powershell API versions7.0,7.1(default) and7.2, the rest are obsolete by Microsoft.
- --temporaryspecify to download the web scraping resources in a temporary folder instead of clobbering the current directory. However if the download fail, the results will be thrown out.
NOTE: The process takes 15+ minutes to run. The more versions you download increases the time.
Add your docset to Zeal
With the Powershell.tar file, unzip it and place it in C:\Users\<your-username>\AppData\Local\Zeal\Zeal\docsets
Limitations
The powershell modules API endpoint is quite new, so it may be subject to breakage by the docs.microsoft.com people.