Skip to content

v0.1.0

Choose a tag to compare

@sparr sparr released this 03 Oct 01:57
· 7 commits to main since this release

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.