Skip to content

Releases: sparr/ksp-source-annotator

Release list

v0.1.1

Choose a tag to compare

@sparr sparr released this 03 Oct 03:49

Documentation build fixes: XML files left by an earlier run for assemblies that no longer have entries are removed, anatid <param> tags naming parameters that no longer exist are dropped, and wiki entries for constructors and generic methods now match their symbols. Maintenance: a comment explains why symbol matching accepts a sole candidate unfiltered, and .NET build output is ignored by git.

v0.1.0

Choose a tag to compare

@sparr sparr released this 03 Oct 01:57

A Python package that decompiles a Kerbal Space Program install into C# source annotated with documentation comments, and builds .NET XML documentation files for IDE tooltips in mod projects.

Commands, each also a Python function:

  • decompile: deobfuscates Assembly-CSharp with de4dot, then exports Assembly-CSharp and KSPAssets as C# projects with ilspycmd.
  • apidocs: merges the official Doxygen docs, anatid's community XML, a KSP wiki export, and the game's en-us UI text into XML documentation files, keyed by Roslyn documentation comment IDs.
  • annotate: writes that documentation into the source as /// comments.
  • link: symlinks the XML files beside the game's assemblies.
  • clean: removes output and those symlinks, and with --cache the built tools and downloads.
  • all: runs decompile, apidocs, and annotate.

The KSP install is found from --ksp-dir, KSP_ROOT, or a search of the Steam, Heroic, and Lutris libraries using a vendored copy of game-install-finder and vdf. Built tools and downloads go to the per-user cache directory. symdump, a Roslyn helper shipped as C# source, lists symbols, verifies the XML, and writes the comments.

Also adds tests, a workflow that runs them and the linters on pushes to main and on pull requests, and a workflow that publishes to PyPI with trusted publishing when a GitHub release is published.