Comments (2)
There seems to be a xml format of the git documentation see if we can use it to bootstrap part of the dictionary!
make user-manual.xml
documentation:
name: documentation
needs: ci-config
if: needs.ci-config.outputs.enabled == 'yes'
env:
jobname: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: ci/install-dependencies.sh
- run: ci/test-documentation.sh
from powertype.
The following xslt should do the trick (some manual fixing after running it will still be required)
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:text> [CommandParameter]@{
Keys = @("</xsl:text>
<xsl:value-of select="substring-after(normalize-space(./refentry/refmeta/refentrytitle), '-')"/>
<xsl:text>");
Name = "</xsl:text>
<xsl:value-of select="substring-after(normalize-space(./refentry/refmeta/refentrytitle), '-')"/>
<xsl:text>";
Description = "</xsl:text>
<xsl:value-of select="normalize-space(./refentry/refnamediv/refpurpose)"/>
<xsl:text>";
Parameters = @{
</xsl:text>
<xsl:for-each select="refentry/*[@id='_options']/variablelist/varlistentry">
<xsl:text> [</xsl:text>
<xsl:choose>
<xsl:when test="contains(., '=')">
<xsl:text>Value</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Flag</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text></xsl:text>
<xsl:text>Parameter]@{</xsl:text>
<xsl:text>
Keys = @(</xsl:text>
<xsl:for-each select="term">
<xsl:text>"</xsl:text>
<xsl:choose>
<xsl:when test="contains(., '=')">
<xsl:value-of select="substring-before(normalize-space(.), '=')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(.)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>"</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>);
Name = "</xsl:text>
<xsl:value-of select="substring-after(normalize-space(./term[last()]), '--')"/>
<xsl:text>";
Description = "</xsl:text>
<xsl:value-of select="replace(normalize-space(listitem/simpara), '"', '`"')"/>
<xsl:text>";
</xsl:text>
<xsl:if test="contains(., '=')">
<xsl:text> Source = $???;
</xsl:text>
</xsl:if>
<xsl:text> },
</xsl:text>
</xsl:for-each>
<xsl:text> },</xsl:text>
</xsl:template>
</xsl:stylesheet>
from powertype.
Related Issues (20)
- Add nvm for windows dictionary
- Handle matches from both ValueParameter without keys and Parameters with Keys
- Move platform to filename
- Add Get-PowerType-Dictionaries HOT 1
- Allow the user to specify what Dictionaries to load
- Add support for loading custom Dictionaries
- Add argument completer mode
- DynamicSource caching does not respect current working directory
- Remove code smells
- Add troubleshooting cmdlet
- simplify conditions to constant
- Fix code scanning alert - Missing statement block after 'else' keyword.
- Improve ast handeling HOT 1
- Order suggestions based on usage
- Remove Add-PowerTypeDictionary
- A parameter cannot be found that matches the parameter name 'PredictionSource' HOT 15
- Git merge should suggest local branches
- git push should suggest origin and branch
- Cannot install 0.0.13-preview HOT 2
- PowerType not usable under ArchLinux with PowerShell 7.2.6 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertype.