This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://blacktree-elements-public.googlecode.com/svn/trunk@41 57e2f9b5-c12c-0410-8e95-a1ee7272c91a
- Loading branch information
jnj
committed
Nov 13, 2008
0 parents
commit a3a23ee
Showing
14 changed files
with
3,213 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>DokuWiki Module</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.blacktree.Quicksilver.QSDokuWikiPlugIn</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>DokuWiki Module</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleVersion</key> | ||
<string>2C</string> | ||
<key>NSPrincipalClass</key> | ||
<string>QSDokuWikiPlugIn</string> | ||
<key>QSActions</key> | ||
<dict> | ||
<key>QSDokuWikiPageEditAction</key> | ||
<dict> | ||
<key>actionClass</key> | ||
<string>QSDokuWikiPlugIn</string> | ||
<key>actionSelector</key> | ||
<string>editPage:</string> | ||
<key>directTypes</key> | ||
<array> | ||
<string>org.splitbrain.dokuwiki.page</string> | ||
</array> | ||
<key>name</key> | ||
<string>Edit</string> | ||
</dict> | ||
<key>QSDokuWikiPageShowAction</key> | ||
<dict> | ||
<key>actionClass</key> | ||
<string>QSDokuWikiPlugIn</string> | ||
<key>actionSelector</key> | ||
<string>showPage:</string> | ||
<key>directTypes</key> | ||
<array> | ||
<string>org.splitbrain.dokuwiki.page</string> | ||
</array> | ||
<key>name</key> | ||
<string>Show</string> | ||
</dict> | ||
<key>QSDokuWikiPageShowRevsAction</key> | ||
<dict> | ||
<key>actionClass</key> | ||
<string>QSDokuWikiPlugIn</string> | ||
<key>actionSelector</key> | ||
<string>showPageRevisions:</string> | ||
<key>directTypes</key> | ||
<array> | ||
<string>org.splitbrain.dokuwiki.page</string> | ||
</array> | ||
<key>name</key> | ||
<string>Show Revisions</string> | ||
</dict> | ||
</dict> | ||
<key>QSPlugIn</key> | ||
<dict> | ||
<key>author</key> | ||
<string></string> | ||
<key>categories</key> | ||
<array/> | ||
<key>description</key> | ||
<string></string> | ||
<key>icon</key> | ||
<string>DokuWiki</string> | ||
<key>relatedBundles </key> | ||
<array/> | ||
</dict> | ||
<key>QSRegistration</key> | ||
<dict> | ||
<key>QSActionProviders</key> | ||
<dict> | ||
<key>QSDokuWikiPlugIn</key> | ||
<string>QSDokuWikiPlugIn</string> | ||
</dict> | ||
<key>QSFSParsers</key> | ||
<dict> | ||
<key>QSDokuWikiParser</key> | ||
<string>QSDokuWikiParser</string> | ||
</dict> | ||
<key>QSObjectHandlers</key> | ||
<dict> | ||
<key>QSDokuWikiPlugIn_Type</key> | ||
<string>QSDokuWikiPlugIn_Source</string> | ||
</dict> | ||
</dict> | ||
<key>QSRequirementsTemplate</key> | ||
<dict> | ||
<key>bundlesTemplate</key> | ||
<array> | ||
<dict> | ||
<key>id</key> | ||
<string></string> | ||
<key>name</key> | ||
<string></string> | ||
<key>version</key> | ||
<string></string> | ||
</dict> | ||
</array> | ||
<key>feature</key> | ||
<integer>0</integer> | ||
<key>launchLoad</key> | ||
<false/> | ||
<key>pathsTemplate</key> | ||
<array> | ||
<string>/path/to/something</string> | ||
</array> | ||
<key>pluginsTemplate</key> | ||
<array> | ||
<dict> | ||
<key>id</key> | ||
<string></string> | ||
<key>name</key> | ||
<string></string> | ||
<key>version</key> | ||
<string></string> | ||
</dict> | ||
</array> | ||
<key>version</key> | ||
<string>1337</string> | ||
</dict> | ||
<key>QSResourceAdditions</key> | ||
<dict> | ||
<key>DokuWiki</key> | ||
<string>[com.blacktree.Quicksilver.QSDokuWikiPlugIn]:DokuWiki.png</string> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// QSDokuWikiPlugIn.h | ||
// QSDokuWikiPlugIn | ||
// | ||
// Created by Nicholas Jitkoff on 2/24/05. | ||
// Copyright __MyCompanyName__ 2005. All rights reserved. | ||
// | ||
|
||
#import <QSCore/QSObject.h> | ||
#import "QSDokuWikiPlugIn.h" | ||
|
||
|
||
|
||
@interface QSDokuWikiPlugIn : NSObject | ||
{ | ||
} | ||
@end | ||
|
||
|
||
@interface QSDokuWikiParser : QSParser | ||
{ | ||
} | ||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// | ||
// QSDokuWikiPlugIn.m | ||
// QSDokuWikiPlugIn | ||
// | ||
// Created by Nicholas Jitkoff on 2/24/05. | ||
// Copyright __MyCompanyName__ 2005. All rights reserved. | ||
// | ||
|
||
#import "QSDokuWikiPlugIn.h" | ||
#define QSDokuWikiPageType @"org.splitbrain.dokuwiki.page" | ||
#define QSDokuWikiNamespaceType @"org.splitbrain.dokuwiki.namespace" | ||
|
||
@implementation QSDokuWikiPlugIn | ||
|
||
- (QSObject *)editPage:(QSObject *)page{ | ||
NSString *path=[page objectForType:QSDokuWikiPageType]; | ||
path=[path stringByReplacing:@"/" with:@":"]; | ||
|
||
[[NSWorkspace sharedWorkspace]openURL: | ||
[NSURL URLWithString:[NSString stringWithFormat:@"http://localhost/~alcor/doku.php?do=edit&id=%@",path]]]; | ||
|
||
return nil; | ||
} | ||
- (QSObject *)showPage:(QSObject *)page{ | ||
NSString *path=[page objectForType:QSDokuWikiPageType]; | ||
path=[path stringByReplacing:@"/" with:@":"]; | ||
|
||
[[NSWorkspace sharedWorkspace]openURL: | ||
[NSURL URLWithString:[NSString stringWithFormat:@"http://localhost/~alcor/doku.php?do=show&id=%@",path]]]; | ||
|
||
return nil; | ||
} | ||
- (QSObject *)showPageRevisions:(QSObject *)page{ | ||
NSString *path=[page objectForType:QSDokuWikiPageType]; | ||
path=[path stringByReplacing:@"/" with:@":"]; | ||
|
||
[[NSWorkspace sharedWorkspace]openURL: | ||
[NSURL URLWithString:[NSString stringWithFormat:@"http://localhost/~alcor/doku.php?do=revisions&id=%@",path]]]; | ||
|
||
return nil; | ||
} | ||
- (QSObject *)showIndexOfNamespace:(QSObject *)page{ | ||
return nil; | ||
} | ||
@end | ||
|
||
|
||
@implementation QSDokuWikiURLParser | ||
- (BOOL)validParserForPath:(NSString *)path{ | ||
if (![[path lastPathComponent]isEqualToString:@"data"])return NO; | ||
NSFileManager *manager=[NSFileManager defaultManager]; | ||
BOOL isDirectory, exists; | ||
exists=[manager fileExistsAtPath:[path stringByStandardizingPath] isDirectory:&isDirectory]; | ||
|
||
return isDirectory; | ||
} | ||
|
||
- (NSArray *)objectsFromPath:(NSString *)path withSettings:(NSDictionary *)settings{ | ||
NSNumber *depth=[settings objectForKey:kItemFolderDepth]; | ||
int depthValue=(depth?[depth intValue]:1); | ||
|
||
NSFileManager *manager=[NSFileManager defaultManager]; | ||
|
||
NSMutableArray *array=[NSMutableArray arrayWithCapacity:1]; | ||
|
||
NSDirectoryEnumerator *de=[manager enumeratorAtPath:path]; | ||
NSString *subpath=nil; | ||
QSObject *obj=nil; | ||
while(subpath=[de nextObject]){ | ||
if ([[subpath pathExtension]isEqualToString:@"txt"]){ | ||
obj=[QSObject fileObjectWithPath:[path stringByAppendingPathComponent:subpath]]; | ||
[obj setObject:[subpath stringByDeletingPathExtension] forType:QSDokuWikiPageType]; | ||
[obj setPrimaryType:QSDokuWikiPageType]; | ||
[array addObject:obj]; | ||
} | ||
} | ||
return array; | ||
} | ||
|
||
@end | ||
|
||
@implementation QSDokuWikiParser | ||
- (BOOL)validParserForPath:(NSString *)path{ | ||
if (![[path lastPathComponent]isEqualToString:@"data"])return NO; | ||
NSFileManager *manager=[NSFileManager defaultManager]; | ||
BOOL isDirectory, exists; | ||
exists=[manager fileExistsAtPath:[path stringByStandardizingPath] isDirectory:&isDirectory]; | ||
|
||
return isDirectory; | ||
} | ||
|
||
- (NSArray *)objectsFromPath:(NSString *)path withSettings:(NSDictionary *)settings{ | ||
NSNumber *depth=[settings objectForKey:kItemFolderDepth]; | ||
int depthValue=(depth?[depth intValue]:1); | ||
|
||
NSFileManager *manager=[NSFileManager defaultManager]; | ||
|
||
NSMutableArray *array=[NSMutableArray arrayWithCapacity:1]; | ||
|
||
NSDirectoryEnumerator *de=[manager enumeratorAtPath:path]; | ||
NSString *subpath=nil; | ||
QSObject *obj=nil; | ||
while(subpath=[de nextObject]){ | ||
if ([[subpath pathExtension]isEqualToString:@"txt"]){ | ||
obj=[QSObject fileObjectWithPath:[path stringByAppendingPathComponent:subpath]]; | ||
[obj setObject:[subpath stringByDeletingPathExtension] forType:QSDokuWikiPageType]; | ||
[obj setPrimaryType:QSDokuWikiPageType]; | ||
[array addObject:obj]; | ||
} | ||
} | ||
return array; | ||
} | ||
@end |
Oops, something went wrong.