Skip to content

Commit

Permalink
BARIS Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel-125 committed Aug 14, 2017
1 parent dfe1d61 commit 66a7d03
Show file tree
Hide file tree
Showing 103 changed files with 1,848 additions and 224 deletions.
4 changes: 4 additions & 0 deletions Buffalo/Buffalo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
<Compile Include="Utilities\WBIFlexFuelPack.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\BARIS\BARIS.csproj">
<Project>{7923C5AB-895D-4687-883E-CD5116986954}</Project>
<Name>BARIS</Name>
</ProjectReference>
<ProjectReference Include="..\..\KerbalActuators\KerbalActuators\KerbalActuators.csproj">
<Project>{691F7D23-82FA-4194-8357-0EF40092C050}</Project>
<Name>KerbalActuators</Name>
Expand Down
1 change: 1 addition & 0 deletions Buffalo/bin/Debug/RunMDSeparator.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MarkdownSeparator API.md Wiki
1 change: 1 addition & 0 deletions Buffalo/bin/Debug/RunPowershell.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Powershell.exe -ExecutionPolicy Unrestricted -file "xmldoc2md.ps1" -xml "xmldoc2md.xml" -xsl "xmldoc2md.xsl" -output "API.md"
18 changes: 18 additions & 0 deletions Buffalo/bin/Debug/xmldoc2md.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# xmldoc2md.ps1
# By Jaime Olivares
# URL: http://github.com/jaime-olivares/xmldoc2md

param (
[string]$xml = $(throw "-xml is required."),
[string]$xsl = $(throw "-xsl is required."),
[string]$output = $(throw "-output is required.")
)

# var = new XslCompiledTransform(true);
$xslt = New-Object -TypeName "System.Xml.Xsl.XslCompiledTransform"

# xslt.Load(stylesheet);
$xslt.Load($xsl)

# xslt.Transform(sourceFile, null, sw);
$xslt.Transform($xml, $output)
182 changes: 182 additions & 0 deletions Buffalo/bin/Debug/xmldoc2md.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
# xmldoc2md.xsl
By Jaime Olivares
URL: http://github.com/jaime-olivares/xmldoc2md
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no" />

<xsl:template match="/">
<xsl:apply-templates select="//assembly"/>
</xsl:template>

<!-- Assembly template -->
<xsl:template match="assembly">
<xsl:text># </xsl:text>
<xsl:value-of select="name"/>
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates select="//member[contains(@name,'T:')]"/>
</xsl:template>

<!-- Type template -->
<xsl:template match="//member[contains(@name,'T:')]">

<xsl:variable name="FullMemberName" select="substring-after(@name, ':')"/>
<xsl:variable name="MemberName">
<xsl:choose>
<xsl:when test="contains(@name, '.')">
<xsl:value-of select="substring-after(@name, '.')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(@name, ':')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:text>&#10;&#10;# </xsl:text>
<xsl:value-of select="$MemberName"/>

<xsl:apply-templates />

<!-- Fields -->
<xsl:if test="//member[contains(@name,concat('F:',$FullMemberName))]">
<xsl:text>&#10;## Fields</xsl:text>
<xsl:text>&#10;</xsl:text>

<xsl:for-each select="//member[contains(@name,concat('F:',$FullMemberName))]">
<xsl:text>&#10;### </xsl:text>
<xsl:value-of select="substring-after(@name, concat('F:',$FullMemberName,'.'))"/>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="normalize-space()" />
</xsl:for-each>
</xsl:if>

<!-- Properties -->
<xsl:if test="//member[contains(@name,concat('P:',$FullMemberName))]">
<xsl:text>&#10;## Properties</xsl:text>
<xsl:text>&#10;</xsl:text>

<xsl:for-each select="//member[contains(@name,concat('P:',$FullMemberName))]">
<xsl:text>&#10;### </xsl:text>
<xsl:value-of select="substring-after(@name, concat('P:',$FullMemberName,'.'))"/>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="normalize-space()" />
</xsl:for-each>
</xsl:if>

<!-- Methods -->
<xsl:if test="//member[contains(@name,concat('M:',$FullMemberName))]">
<xsl:text>&#10;## Methods</xsl:text>
<xsl:text>&#10;</xsl:text>

<xsl:for-each select="//member[contains(@name,concat('M:',$FullMemberName))]">

<!-- If this is a constructor, display the type name (instead of "#ctor"), or display the method name -->
<xsl:choose>
<xsl:when test="contains(@name, '#ctor')">
<xsl:text>&#10;&#10;### Constructor</xsl:text>
<!-- xsl:value-of select="$MemberName"/ -->
<!-- xsl:value-of select="substring-after(@name, '#ctor')"/-->
</xsl:when>
<xsl:otherwise>
<xsl:text>&#10;&#10;### </xsl:text>
<xsl:value-of select="substring-after(@name, concat('M:',$FullMemberName,'.'))"/>
</xsl:otherwise>
</xsl:choose>

<xsl:if test="count(remarks)!=0">
<xsl:apply-templates select="remarks" />
</xsl:if>

<xsl:if test="count(summary)!=0">
<xsl:apply-templates select="summary" />
</xsl:if>

<xsl:if test="count(param)!=0">
<xsl:text>&#10;&gt; #### Parameters</xsl:text>
<xsl:apply-templates select="param"/>
</xsl:if>

<xsl:if test="count(returns)!=0">
<xsl:text>&#10;&gt; #### Return value</xsl:text>
<xsl:apply-templates select="returns"/>
</xsl:if>

<xsl:if test="count(exception)!=0">
<xsl:text>&#10;&gt; #### Exceptions</xsl:text>
<xsl:apply-templates select="exception"/>
</xsl:if>

<xsl:if test="count(example)!=0">
<xsl:text>&#10;&gt; #### Example</xsl:text>
<xsl:text>&#10;&gt; </xsl:text><xsl:apply-templates select="example" />
</xsl:if>

</xsl:for-each>
</xsl:if>
</xsl:template>

<xsl:template match="summary">
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="remarks">
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="c">
<xsl:text>`</xsl:text>
<xsl:value-of select="normalize-space()" />
<xsl:text>`</xsl:text>
</xsl:template>

<xsl:template match="code">
<xsl:text>&#10;```&#10;</xsl:text>
<xsl:value-of select="text()" />
<xsl:text>```</xsl:text>
</xsl:template>

<xsl:template match="exception">
<xsl:text>&#10;&gt; **</xsl:text><xsl:value-of select="substring-after(@cref,'T:')"/>:** <xsl:value-of select="normalize-space()" /><xsl:text>&#10;</xsl:text>
</xsl:template>

<xsl:template match="include">
[External file]({@file})
</xsl:template>

<xsl:template match="para">
<xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="param">
<xsl:text>&#10;&gt; **</xsl:text><xsl:value-of select="@name"/>:** <xsl:value-of select="normalize-space()" /><xsl:text>&#10;</xsl:text>
</xsl:template>

<xsl:template match="paramref">
<xsl:text>*</xsl:text>
<xsl:value-of select="@name" />
<xsl:text>*</xsl:text>
</xsl:template>

<xsl:template match="permission">
<xsl:text>&#10;**Permission:** *</xsl:text><xsl:value-of select="@cref" />* &#10;<xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="returns">
<xsl:text>&#10;&gt; </xsl:text>
<xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="see">
<xsl:text>&#10;&gt; *See: </xsl:text><xsl:value-of select="@cref" />*
</xsl:template>

<xsl:template match="seealso">
<xsl:text>&#10;&gt; *See also: </xsl:text>
<xsl:value-of select="@cref" />
</xsl:template>

</xsl:stylesheet>
7 changes: 7 additions & 0 deletions Buffalo/obj/Debug/Buffalo.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\UnityEngine.xml
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\obj\Debug\Buffalo.csprojResolveAssemblyReference.cache
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\obj\Debug\Buffalo.dll
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\obj\Debug\Buffalo.pdb
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\BARIS.dll
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\BARIS.pdb
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\MarkdownSeparator.exe
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\RunPowershell.bat
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\xmldoc2md.ps1
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\xmldoc2md.xsl
C:\Projects\KSP\WildBlueIndustries\Buffalo\Buffalo\bin\Debug\RunMDSeparator.bat
23 changes: 23 additions & 0 deletions GameData/WildBlueIndustries/000BARIS/BARIS.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"NAME":"BARIS",
"URL":"https://raw.githubusercontent.com/Angel-125/BARIS/master/GameData/WildBlueIndustries/000BARIS/BARIS.version",
"DOWNLOAD":"https://github.com/Angel-125/BARIS/releases",
"GITHUB":
{
"USERNAME":"Angel-125",
"REPOSITORY":"BARIS",
"ALLOW_PRE_RELEASE":false,
},
"VERSION":
{
"MAJOR":1,
"MINOR":0,
"PATCH":0
},
"KSP_VERSION":
{
"MAJOR":1,
"MINOR":3,
"PATCH":0
},
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 66a7d03

Please sign in to comment.