UnrealEngineDocset icon indicating copy to clipboard operation
UnrealEngineDocset copied to clipboard

A python script that generates Dash compatible documentation for Unreal Engine 4.

Unreal Engine 4 documentation in Dash

This python script generates Dash compatible documentation from the documentation that ships with Unreal Engine 4 in CHM format. As a result, you get one click access to the documentation directly from Xcode, if you're using Dash as your main documentation browser:

Imgur

Xcode's own documentation browser is not (yet) supported, as it uses a slightly more complicated format and I'm using Dash personally. I don't have time for that right now, but if anyone wants to tackle that, just submit a pull request and I'll merge it, thanks! Here is some info on Xcode's format.

Instructions

  1. Get the CHM documentation from:

    • Windows: C:\Program Files\Unreal Engine\4.x\Engine\Documentation
    • Mac: /Users/Shared/UnrealEngine/4.x/Engine/Documentation
  2. Extract the CHM file to HTML. You should get a folder that looks something like this:

    Imgur

    There are lots of tools that can do this. I used CHM Decompiler. The script could probably be expanded to do this on its own using something like PyCHM, but for now, you have to do this manually.

  3. The script uses BeautifulSoup to parse the documentation. If you don't have it already, install it:

     $ easy_install beautifulsoup4
    
  4. Run the python script to generate the Dash compatible DocSet from the extracted HTML documentation:

     $ python ue4docset.py -n "Unreal Engine" ~/Desktop/API ~/Desktop/UE4.docset
    

    The first path is the location of the extracted HTML documentation. The second path is the output DocSet file. You can define the name of the documentaion as it will appear in Dash, using the -n option.

    The process will take some time to parse the entire documentation. On my relatively performant machine it takes around 7 minutes to finish.

  5. Go to Dash > Preferences > Docsets. Click the + button and add select the generated .docset file.