[译]自然文档向导
By robot-v1.0
本文链接 https://www.kyfws.com/applications/natural-docs-wizard-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 5 分钟阅读 - 2134 个词 阅读量 0[译]自然文档向导
原文地址:https://www.codeproject.com/Articles/8420/Natural-Docs-Wizard
原文作者:Todd Davis
译文由本站 robot-v1.0 翻译
前言
A small wizard application to create and edit Natural Docs batch files.
一个小型向导应用程序,用于创建和编辑Natural Docs批处理文件.
介绍(Introduction)
我最近才开始使用C ++进行编程(VB.NET是我赚钱的方式),并且不愿意写一些小类和程序.作为一个喜欢共享的人,我认为将一些文档包含在您在线共享的程序中是一个好主意,因此人们对代码中正在发生的事情有所了解,而不必一一列举.(I just recently began programming in C++ (VB.NET is my is how I earn my wages) and have taken a stab at writing some small classes and programs. Being one who likes to share, I think it’s a good idea to include some documentation with the programs that you share online, so people have some idea of what is going on in your code without having to pick it apart piece by piece.)
我问了编程界的一些人,什么是C ++最好的文档软件,当然,我得到了很多答案.但是两个最受欢迎的软件包是(I asked some folks in the programming community what the best documentation software was for C++, and of course, I got a lot of answers. But the two most popular packages were) 强生(DoxyGen) 和(and) 自然文件(Natural Docs) .两者都是出色的产品,但是我碰巧喜欢Natural Doc的注释语法风格,因此我选择先尝试一下.(. Both are excellent products, but I happened to like the style of Natural Doc’s comment syntax, and so I chose to try that out first.)
问题(The Problem)
Natural Docs使注释您的代码变得非常轻松自然.但是,要运行Natural Docs,您需要首先创建一个批处理文件(除非您是个惩罚者)才能使用所有必需的路径和选项来运行程序. DoxyGen需要做同样的事情,但是有一个不错的小向导可以为您完成肮脏的工作.我知道Natural Docs的作者正在努力扩展程序的功能,并且可能还没有时间做这种事情,所以我自己动手做.(Natural Docs makes commenting your code very easy and natural. But in order to run Natural Docs, you need to first create a batch file (unless you’re a sucker for punishment) to run the program with all of its required paths and options. DoxyGen requires the same thing, but has a nice little wizard to do the dirty work for you. I know the author of Natural Docs is hard at work expanding the program’s features, and probably hasn’t had time to get around to doing this kind of stuff yet, so I just rolled my own.)
解决方案(The Solution)
Natural Docs向导是一个简单的GUI,用于创建,编辑和保存Natural Docs批处理文件.它包括Natural Docs v1.22以来的所有可能选项,包括具有多个输入和输出文件及格式的能力.它可以读取以简写或简写的选项符号(即-i或–input或–source)编写的批处理文件.您可以指定自己的(Natural Docs Wizard is a simple GUI to create, edit, and save Natural Docs batch files. It includes all the possible options as of Natural Docs v1.22, including the ability to have multiple input and output files and formats. It can read batch files written in either shorthand or longhand option notation (i.e., -i or –input or –source). You can specify your own)** .css(**.css*)*文件以及-中的任何内容(*files as well - anything in the*)*/样式(*/Styles*)*程序将读取该文件夹,并提供给您使用.程序中使用了工具提示,以使您了解在忘记的情况下哪些选项可以做什么.总的来说,该程序是非常自我解释的,并且在您工作时始终会向您显示批处理文件的"实时"副本.您可以选择直接从向导运行批处理文件.(*folder will be read by the program and offered up for your use. Tool tips have been used to death in the program in order to give you an idea of what options do what, in case you forgot. Overall, the program is very self explanatory, and will always show you a “live” copy of the batch file as you work. You can choose to run the batch file right from the wizard.*)
一些评论(A Few Comments)
我在上面包括了可执行文件和源代码下载.您只需要可执行文件,(I included both the executable and the source code downloads above. All you need is the executable,)应该从您的Natural Docs文件夹中运行(which should be run from your Natural Docs folder).如果不是从Natural Docs文件夹运行的,程序将提示您输入文件的位置.(. If it is not run from the Natural Docs folder, the program will prompt you to input the location of the)/样式(/Styles*)*文件夹(尽管它随后会记住该位置).(*folder (although it remembers where that is, afterwards).*)
该向导在一个晚上几乎被拼凑在一起,因此,源代码中没有注释.我为此表示歉意,但是,这是一个免费工具,我并不是真的想教任何人任何东西.此外,该工具不是火箭科学.如果有机会,我将注释代码.在此之前,只需花几分钟的时间仔细阅读代码,即可清楚了解其操作.(The wizard was pretty much thrown together in an evening, and as such, there are no comments in the source code. I apologize for that, however, this being a free tool, I’m not really attempting to teach anyone anything. Besides, the tool isn’t rocket science. If I get a chance, I’ll comment the code. Until then, just a few minutes of perusing the code should make its operation clear.)
通过提供源代码,您应该能够为已发布的任何新版本更新向导(如果没有的话).请注意,代码在VB.NET中,因此(By supplying the source code, you should be able to update the wizard for any new versions that are released (if I don’t). Be aware that the code is in VB.NET, so)您需要.NET框架才能运行程序(you need the .NET framework in order to run the program).也许,一些有进取心的人会花一些时间来制作一个与平台无关的版本.(. Perhaps, some enterprising person will take the time to make a more platform independent version.)
哦,再快一点(Oh, one more quick note)-Natural Docs文档中提到了这一点,但我觉得这里需要重复一遍-您应该将Natural Docs文件夹添加到PATH,或者从Natural Docs文件夹运行批处理文件.否则,将找不到NaturalDocs.bat文件.(- this is mentioned in the Natural Docs documentation, but I feel it bears repeating here - you should either add the Natural Docs folder to your PATH, or run the batch files from the Natural Docs folder. Otherwise, the NaturalDocs.bat file won’t be found.)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
VB C++ Windows .NET .NET1.1 Visual-Studio VS.NET2003 Dev 新闻 翻译