Skip to content

Commit

Permalink
edited manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-tekampe committed Jun 4, 2015
1 parent 346163d commit 17a3321
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 26 deletions.
4 changes: 2 additions & 2 deletions macbrush/macbrush.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
2912BF7C1B2084FB00FAC05E /* macbrush.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; name = macbrush.1; path = macbrush/macbrush.1; sourceTree = "<group>"; };
294BF1931B1A13CD00506C50 /* macbrush */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = macbrush; sourceTree = BUILT_PRODUCTS_DIR; };
294BF1961B1A13CD00506C50 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
294BF19E1B1A141800506C50 /* GBCli.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBCli.h; sourceTree = "<group>"; };
Expand All @@ -39,7 +40,6 @@
294BF1A51B1A141800506C50 /* GBSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBSettings.h; sourceTree = "<group>"; };
294BF1A61B1A141800506C50 /* GBSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBSettings.m; sourceTree = "<group>"; };
294BF1A71B1A141800506C50 /* main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = "<group>"; };
29D42FF31B1A26E6003C4D11 /* macbrush.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = macbrush.rb; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -56,6 +56,7 @@
294BF18A1B1A13CD00506C50 = {
isa = PBXGroup;
children = (
2912BF7C1B2084FB00FAC05E /* macbrush.1 */,
294BF1951B1A13CD00506C50 /* macbrush */,
294BF1941B1A13CD00506C50 /* Products */,
);
Expand All @@ -72,7 +73,6 @@
294BF1951B1A13CD00506C50 /* macbrush */ = {
isa = PBXGroup;
children = (
29D42FF31B1A26E6003C4D11 /* macbrush.rb */,
294BF19E1B1A141800506C50 /* GBCli.h */,
294BF19F1B1A141800506C50 /* GBCommandLineParser.h */,
294BF1A01B1A141800506C50 /* GBCommandLineParser.m */,
Expand Down
41 changes: 26 additions & 15 deletions macbrush/macbrush/macbrush.1
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5.
.TH MACBRUSH, "1" "Juni 2015" "macbrush, Version 0.6" "User Commands"
.TH MACBRUSH, "1" "Juni 2015" "macbrush, Version 0.7" "User Commands"
.SH NAME
macbrush, \- manual page for macbrush, Version 0.6
macbrush, \- Keep OS X folders clean of temporary files
.SH DESCRIPTION
usage: macbrush [\-d] [\-a] [\-o] [\-i] [\-s] [\-v] [\-c] [\-o] [\-h] targetDirectory
.SH "SEE ALSO"
The full documentation for
.B macbrush,
is maintained as a Texinfo manual. If the
.B info
and
.B macbrush,
programs are properly installed at your site, the command
.IP
.B info macbrush,
.PP
should give you access to the complete manual.
.SH OPTIONS
.TP
.BR \-d ", " \-\-ignore\-dot\underscore
Do not remove ._ files.
.BR \-a ", " \-\-ignore\-apdisk
Do not remove .apdisk\-files.
.BR \-s ", " \-\-ignore\-dsstore
Do not remove .DS_Store\-files.
.BR \-i ", " \-\-ignore\-volumeicon
Do not remove .VolumeIcon.icnds\-files.
.BR \-s ", " \-\-silmulate
Do not remove any files. Simulation only. Pleaes use in combination with \-\-verbose.
.BR \-V ", " \-\-verbose
Verbose logging.
.BR \-c ", " \-\-skip\-clean
Do not clean folders. Directly enter observation mode.
.BR \-o ", " \-\-skip\-observation
Do not enter observation mode. Only clean folders once.
.BR \-h ", " \-\-help
Print help message.
.BR \-v ", " \-\-version
Print version information.
.SH AUTHOR
Nils Tekampe <nils at tekampe dot org>
2 changes: 2 additions & 0 deletions macbrush/macbrush/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#endif

#define USAGE @"usage: macbrush [-d] [-a] [-o] [-i] [-s] [-v] [-c] [-o] [-h] targetDirectory"
#define VERSION @"macbrush, Version 0.7"
#define INFO @"macbrush - Keep OS X folders clean of temporary files"

void logger(NSString *message, bool verbose_only);
void mycallback(
Expand Down
16 changes: 7 additions & 9 deletions macbrush/macbrush/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ int main(int argc, const char * argv[]) {

// Create parser and register all options.
GBCommandLineParser *parser = [[GBCommandLineParser alloc] init];
[parser registerOption:@"help" shortcut:'h' requirement:GBValueNone];
[parser registerOption:@"version" shortcut:'v' requirement:GBValueNone];
[parser registerOption:@"ignore-dot-underscore" shortcut:'d' requirement:GBValueNone];
[parser registerOption:@"ignore-apdisk" shortcut:'a' requirement:GBValueNone];
[parser registerOption:@"ignore-dsstore" shortcut:'o' requirement:GBValueNone];
[parser registerOption:@"ignore-dsstore" shortcut:'s' requirement:GBValueNone];
[parser registerOption:@"ignore-volumeicon" shortcut:'i' requirement:GBValueNone];
[parser registerOption:@"simulate" shortcut:'s' requirement:GBValueNone];
[parser registerOption:@"verbose" shortcut:'v' requirement:GBValueNone];
[parser registerOption:@"verbose" shortcut:'V' requirement:GBValueNone];
[parser registerOption:@"skip-clean" shortcut:'c' requirement:GBValueNone];
[parser registerOption:@"skip-observation" shortcut:'o' requirement:GBValueNone];
[parser registerOption:@"help" shortcut:'h' requirement:GBValueNone];
[parser registerOption:@"version" shortcut:0 requirement:GBValueNone];


// Register settings and then parse command line
[parser registerSettings:settings];
Expand All @@ -83,14 +84,13 @@ int main(int argc, const char * argv[]) {
//***********************************************

if ([settings boolForKey:@"help"]){

logger(INFO, false);
logger(USAGE, false);
return 0;
}

if ([settings boolForKey:@"version"]){

logger(@"macbrush, Version 0.6", false);
logger(VERSION, false);
return 0;
}

Expand Down Expand Up @@ -407,10 +407,8 @@ void cleanDirectory(NSString *directory)
filename= [directory stringByAppendingPathComponent:file];
processFile(filename);
}




logger([NSString stringWithFormat:@"%@%@", @"Finished cleaning directory :" , directory],false);
logger([NSString stringWithFormat:@"%d%@",sumDotAPDisk, @" .AP_Disk files have been removed"],false);
logger([NSString stringWithFormat:@"%d%@",sumDotUnderscore, @" ._ files have been removed"],false);
Expand Down
Empty file removed macbrush/manpage
Empty file.

0 comments on commit 17a3321

Please sign in to comment.