hexrays-docset
A command-line utillity to generate a Dash Docset for the HexRays decompiler.
This project is extremely rough around the edges. I wrote it in a hurry. PRs to polish it up are welcome!
Usage
hexrays-docset <path-to-docset-bundle>
First steps
- Follow this guide to create the
.docset
bundle. Use theInfo.plist
in the root of this repository as theInfo.plist
for your docset. - Open a terminal and
cd
into theResources
folder of your docset - Run the following command to download the documentation for offline use:
There should be no subfolders inside
wget -m -k -p -L -np -nd -nH -D hex-rays.com https://hex-rays.com/products/decompiler/manual/sdk/index.shtml
Resources
. - Run this utility, passing in the path to your docset.
- If you wish to adjust the web pages at all, do that now. See Adjustments below.
- Put your docset wherever you want then double click it to add it to Dash. Dash will not copy or move it for you.
Adjustments
Open Resources/index.shtml
in a browser. You may want to adjust the CSS and remove some annoying tags.
I removed the following tags:
<header>
<div id="header-top">
<div id="sales">
You will need to use something like VS Code or sed
to find and remove the entire contents of each tag. If you end up removing these tags, you will need to adjust some CSS too. As for that, the wget
command I used did not download some CSS files, at the expense of only downloading the documentation files and not the entire website. I couldn't figure out how to make it download any CSS file but only shtml
files under /sdk/
. Anyway, I found that I wanted most of the CSS offline. So you will need to manually download these three files, throw them into Resources
, and do a find-and-replace to replace their respsective URLs in every file with their filenames alone. i.e. https://use.typekit.net/mhw5sar.css
→ mhw5sar.css
- https://use.typekit.net/mhw5sar.css
- https://hex-rays.com/wp-content/themes/hx2021/dist/css/style.min.css
- https://hex-rays.com/wp-content/themes/hx2021/dist/css/uicons-regular-rounded/css/uicons-regular-rounded.css
Then, you can adjust the CSS to replace the massive margin-top: 160px;
with margin-top: 0px;
for #main
.