非常抱歉我的问题很简单,但我正在尝试使用Appledocs(https://github.com/tomaz/appledoc#quick-install)生成文档。
我不确定如何准确地设置它。我是这样做的:
- 我克隆了GitHub存储库,然后使用终端中的安装脚本安装appledocs (我通过appledocs --help确认了这一点)。
现在,我该如何实际使用它,以便将我的项目放在Xcode中:
- 我该如何生成文档文件?
- 它生成在哪里?
非常抱歉我的问题很简单,但我正在尝试使用Appledocs(https://github.com/tomaz/appledoc#quick-install)生成文档。
我不确定如何准确地设置它。我是这样做的:
现在,我该如何实际使用它,以便将我的项目放在Xcode中:
/usr/local/bin/appledoc \
--project-name HereProjectName \
--project-company "HereProjectCompany" \
--company-id com.companyName \
--keep-undocumented-objects \
--keep-undocumented-members \
--search-undocumented-doc \
--exit-threshold 2 \
--ignore .m \
--output "AppleDoc" .
//
// GSUserDefaults.h
//
// Created by Gabor Szabo on 30/01/2013.
//
//
#import <Foundation/Foundation.h>
/*!
@discussion This class manages the user defaults on the device with some extra convenient methods.
## Version information
__Version__: 1.0
__Found__: 2013-01-30
__Last update__: 2013-01-30
__Developer__: Gabor Szabo, TMTI Ltd.
*/
#pragma mark - Interface
@interface GSUserDefaults : NSObject {
}
#pragma mark - Class Methods
#pragma mark - Getters
/// @name Getter methods
/*!
@abstract Returns the value for the key.
@discussion It reads the values from the `NSUserDefaults`.
@param key The key, it must be not `nil`.
@return The value object for the key.
@exception NSException Thrown when the key is `nil`.
@since 1.0+
*/
+ (id)valueForKey:(NSString *)key;
/*!
@abstract Returns a value collection for the keys.
@discussion It reads the values from the `NSUserDefaults`.
@param keys The set of keys, which are affected.
@return The value collection for the desired keys.
@exception NSException Thrown when the key is `nil`.
@since 1.0+
*/
+ (NSDictionary *)valuesForKeys:(NSSet *)keys;
#pragma mark - Setters
/// @name Setter methods
/*!
@abstract Sets a value for the selected key.
@discussion The value always will be overridden. It sets the value to the `NSUserDefaults`.
@param value The value object, it can be `nil`, in case of `nil` the key will be removed from the `NSUserDefaults`.
@param key The key for the value, it cannot be `nil`.
@exception NSException Thrown when the key is `nil`.
@since 1.0+
*/
+ (void)setValue:(id)value forKey:(NSString *)key;
/*!
@abstract Sets `nil` values for the selected keys.
@discussion The value always will be overridden. It removs the from the `NSUserDefaults`.
@param keys The set of keys, which are affected.
@since 1.0+
*/
+ (void)setNilValueForKeys:(NSSet *)keys;
/*!
@abstract Sets a default value for the selected keys.
@discussion It the key already exists, it won't be overridden, if the value was `nil` for the key, the key gets the value. It sets the values to the `NSUserDefaults`.
@param defaultValue The value object, it could be `nil`, in case of the `nil` just nothing will happen, the keys won't be removed.
@param keys The set of keys, which are affected.
@since 1.0+
*/
+ (void)setDefaultValue:(id)defaultValue forKeys:(NSSet *)keys;
/*!
@abstract Sets the value for the selected keys.
@discussion The values always will be overridden, if the value was `nil` for the key, the key gets the value. It sets the values to the `NSUserDefaults`.
@param value The value object, it can be `nil`, in case of `nil` the key will be removed from the `NSUserDefaults`.
@param keys The set of keys, which are affected.
@since 1.0+
*/
+ (void)setValue:(id)value forKeys:(NSSet *)keys;
@end
推荐的方法是从GitHub克隆项目并从Xcode编译工具。由于克隆GitHub项目将创建到主存储库的链接,因此这大大简化了未来的升级。要安装,请在终端中键入以下内容:
git clone git://github.com/tomaz/appledoc.git
这将创建appledoc目录。在其中,您可以找到appledoc.xcodeproj Xcode项目;打开它并编译appledoc目标 - 这应该可以直接使用,但是您的系统必须满足最低系统要求,请参见下文。我建议您将生成的appledoc可执行文件从构建目录复制到路径中的一个目录(echo $PATH),以便轻松访问。
可选:Appledoc是自包含的,并包含必要的模板文件。如果您想修改这些默认值,请将其从Templates子目录复制到预期位置之一:
~/Library/Application Support/appledoc
~/.appledoc
欲了解更多信息请访问
--project-name
设为动态的,但是我找不到其他两个字段的类似变量。求助 D: - Alexander