Document Generation tool using Objective-c: Appledoc
Preface
The number of people doing the project requires documentation. Try to write some project documents today. But in terms of source code, the document is best and source together, so update more convenient and handy. Like the Java language itself comes with the Javadoc command, you can extract documents from the source code. Today took time to investigate similar tools for the Objective-c language.
Three more popular tools were found on StackOverflow: Doxygen, Headdoc and Appledoc. Their respective official web sites are as follows:
- Docxygen http://www.stack.nl/~dimitri/doxygen/index.html
- Headdoc http://developer.apple.com/opensource/tools/headerdoc.html
- Appledoc http://gentlebytes.com/appledoc/
Introduced
I have a look at all 3 tools, and say how I feel.
Docxygen
Docxygen feeling is that the 3 tools support the most languages, can be configured in more places. I probably looked at the document, I thought it was more complicated, and the default generated style was inconsistent with Apple's style. I went to see the introduction of the 2 tools in the back. In addition, although it is open source software, but did not put the source on GitHub to make me feel that the development of this tool is not enough activity.
Headerdoc
Headerdoc is a document generation tool that comes with Xcode. After you install Xcode, you can use the command line: headdoc2html + source file name to generate the corresponding document. I have a personal trial, or it is more convenient, but Headerdoc note generation rules are more special, only generate /\*! \*/
comments in the format. Another disadvantage is that each class file corresponds to a comment file, there is no summary of the file, this feeling a bit uncomfortable.
Appledoc
Appledoc is an annotation tool that is recommended by everyone on the StackOverflow. There are several reasons why I like it better:
- Its default generated document style is consistent with Apple's official documentation, and Doxygen needs to be configured separately.
- Appledoc is generated with objective-c, the necessary time to debug and change is also more convenient.
- Docset can be generated and integrated into Xcode. This is great, equivalent to holding down option in the source code and then clicking to bring up the appropriate method of help.
- Appledoc source is on GitHub, and Doxygen is on SVN. I personally think that more active open source projects should be on GitHub.
- In contrast to Headerdoc, it has no special comment requirements, can be used
/\*\* \*/
in the format, can also be compatible /\*! \*/
with the format of the comment, and the resulting comment has a summary page.
Installation
So a simple introduction to how to install Appledoc, installation is very simple, only need 2 steps:
git clone git://github.com/tomaz/appledoc.gitcd appledocsudo sh install-appledoc.sh
|
Use
When using Appledoc, you only need to use the following command:
Appledoc-o./doc--project-name ynote--project-company Youdao.
|
Appledoc scans all files under the current path, and then generates a good document to be placed in the doc directory. You can also appledoc --help
view all the available parameters.
Basically it is easy to use, detailed information can be viewed in the official documentation: http://gentlebytes.com/appledoc/
Document Generation tool using Objective-c: Appledoc