如何使用 appledoc 生成类似 Apple 的文档 [英] how to use appledoc to generate an Apple-like documentations
问题描述
我正在此处阅读有关如何生成类似 Apple 的 HTML 文档的文章.我的问题是命令行的用途.我们如何结合命令行和 appledoc xcode 项目来生成 HTML.
I am reading on the article how to generate an Apple-like HTML documentation at here. My questions are what the command lines are used for. How can we combine command lines and appledoc xcode project to generate a HTML.
推荐答案
我没有使用过 'appledoc',但从快速浏览您链接的页面看来,它是一个开源命令行实用程序.因此,第一步将是编译appledoc"程序本身,然后将其粘贴在您路径中的目录中,例如 /usr/local/bin
或 ~/bin/代码>.
I haven't used 'appledoc', but from a quick look at the page you linked it appears that it's an open-source command-line utility. So the first step will be to compile the 'appledoc' program itself, and then stick it in a directory that's in your path, such as /usr/local/bin
or ~/bin/
.
下一步是尝试使用它来生成一些文档(假设您已经创建了它使用的 Markdown 文件).打开终端窗口,导航到您的文件所在的目录,然后使用您链接的页面顶部给出的命令:
The next step is to try to use it to generate some documentation (assuming that you've already created the markdown files that it consumes). Open a terminal window, navigate to the directory where your files are, and then use the command given at the top of the page that you linked:
appledoc --project-name appledoc --project-company "Gentle Bytes" --company-id com.gentlebytes --output ~/help .
如果您想在每次构建某个项目时使用appledoc"来重新生成文档,您可以将运行脚本"构建阶段添加到项目中的现有目标,或者仅为具有以下特性的文档创建一个新目标只不过是运行脚本"构建阶段.无论哪种方式,该阶段的脚本都应该是包含类似于上述命令的 shell 脚本(尽管您可能希望明确指定源目录,而不仅仅是使用当前"目录,即 .
.代码>).
If you want to use 'appledoc' to regenerate your documentation every time you build some project, you can add a "Run Script" build phase to an existing target in your project, or create a new target just for documentation that has nothing but a "Run Script" build phase. Either way, the script in that phase should be shell script containing a command similar to the one above (though you'll probably want to specify the source directory explicitly rather than just using the 'current' directory, i.e. .
).
这篇关于如何使用 appledoc 生成类似 Apple 的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!