Appledoc automatically copy html to project directory

906 views Asked by At

So I have a build script which runs after building my library in xcode which generates the appledoc documentation and installs it into XCode.

Annoyingly this puts all the HTML etc into an obscure folder in the (hidden) Library folder in my user home folder.

What would be really great would be to be able to copy the HTML out of these docsets and put them into a folder in the project directory. This can then be copied into a zipped archive of the library when it needs to be published.

If it is a case of doing it manually (looking through appledoc's help page it doesn't seem like it can do this out of the box) then I can do that, but is there any way to get the final directory path from appledoc? The only way that I can see would be to pull apart the output file and find the path in there.

Thanks for any help! :)

Tom

2

There are 2 answers

0
poetmountain On

You can use an Appledoc project settings file to customize the output path (among other things) of your documentation.

Specifically, you can add this key to your AppledocSettings.plist file:

<key>--output</key>
<array>
    <string>Documentation/</string>
</array>

You can accomplish the same thing with a pile of command-line switches, but typing appledoc ~/path/project.plist is a lot cleaner.

EDIT: It seems that Gentlebytes' Appledoc documentation has vanished due to site re-org (ironic, that), so the link is currently a 404. Here is at least a simple example of the AppledocSettings.plist format, which you can add the --output key to.

0
backslash-f On

Like @Bourbon Jockey mentioned, you could use a plist file. The way it worked for me, however, is slightly different:

  1. Put AppledocSettings.plist in the root of your project (note the "S" uppercased).
  2. The "--output" doesn't necessarily need to be inside an array. Below is an example of what worked for me:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
          <key>--project-name</key>  
          <string>The New Achiever</string>

          <key>--project-company</key>  
          <string>NHOC</string> 

          <key>--company-id</key>  
          <string>com.nhoc</string>

          <key>--ignore</key>
          <array>
              <string>*.m</string>
          </array>

          <key>--output</key>
          <string>/Users/Fernando/Documents/Projetos/Software/Achiever/Help</string>

          <key>--keep-intermediate-files</key>  
          <true/>
    </dict>
    </plist>

Run with:

appledoc .

These links helped me a lot:

Gentle Bytes Settings and parameters
Amazing Apple-like Documentation