Changeset 6447
- Timestamp:
- 08/21/08 14:00:58 (5 months ago)
- Location:
- Trunk/association/services/pluginLibrary
- Files:
-
- 12 added
- 9 removed
- 3 modified
- 1 copied
- 1 moved
-
TODO (modified) (2 diffs)
-
aggregator.py (modified) (1 diff)
-
dirScraper.py (modified) (2 diffs)
-
test/bar/adipisicing (deleted)
-
test/bar/adipisicing.js (copied) (copied from Trunk/association/services/pluginLibrary/test/bar/includeLibrary.txt) (1 diff)
-
test/bar/adipisicing.js.meta (added)
-
test/bar/amet (deleted)
-
test/bar/amet.js (added)
-
test/bar/consectetur (deleted)
-
test/bar/consectetur.js (moved) (moved from Trunk/association/services/pluginLibrary/test/bar/includeLibrary.txt) (1 diff)
-
test/bar/consectetur.js.meta (added)
-
test/bar/elit (deleted)
-
test/bar/elit.js (added)
-
test/bar/includeLibrary.txt.js (added)
-
test/foo/dolor (deleted)
-
test/foo/dolor.js (added)
-
test/foo/dolor.js.meta (added)
-
test/foo/excludeLibrary.txt (deleted)
-
test/foo/excludeLibrary.txt.js (added)
-
test/foo/ipsum (deleted)
-
test/foo/ipsum.js (added)
-
test/foo/ipsum.js.meta (added)
-
test/foo/lorem (deleted)
-
test/foo/lorem.js (added)
-
test/foo/sit (deleted)
-
test/foo/sit.js (added)
Legend:
- Unmodified
- Added
- Removed
-
Trunk/association/services/pluginLibrary/TODO
r6431 r6447 1 1 == Aggregator == 2 2 3 * dirScraper: support for .meta files4 3 * dirScraper: wildcards support for black-/whitelisting 5 4 * logging … … 50 49 == Misc. == 51 50 51 * review TODO, XXX and DEBUG markers in the code 52 52 * code sanitizing 53 53 * refactoring -
Trunk/association/services/pluginLibrary/aggregator.py
r6427 r6447 17 17 from dirScraper import dirScraper 18 18 19 def main(args ):19 def main(args = []): 20 20 store = Store("text") 21 21 repos = getRepositories("repos.lst") -
Trunk/association/services/pluginLibrary/dirScraper.py
r6430 r6447 73 73 plugin.tags = "systemConfig" # XXX: should be list; cf. aggregator.getPlugins() 74 74 plugin.text = self._get(self.host + dir + uri) 75 if uri + ".meta" in uris: # retrieve metadata 76 retrieveMetadata(plugin, self.host + dir + uri + ".meta") 75 77 plugins.append(plugin) 76 78 elif uri.endswith("/") and recursive: # directory -- XXX: potential for infinite loop? … … 78 80 return plugins 79 81 82 def retrieveMetadata(plugin, uri): # TODO: rename!? 83 """ 84 retrieve plugin's metadata from accompanying meta file 85 86 meta file is named after plugin file, using .js.meta extension 87 meta file contains one field per line 88 field format is "key: value" 89 90 @param plugin: TiddlyWeb tiddler 91 @type plugin: Tiddler 92 @param uri: path to meta file 93 @type uri: str 94 @return: None 95 """ 96 fields = self._get(uri).split("\n") 97 for field in fields: 98 if ":" in field: 99 k, v = [c.strip() for c in field.split(":", 1)] 100 if k in ["title", "created", "modified", "modifier"]: 101 setattr(plugin, k, v) 102 elif k == "tags": 103 for tag in v.split(" "): # TODO: resolve bracketed list 104 if tag not in plugin.tags: 105 plugin.tags.push(tag) 106 else: 107 #plugin.fields[k] = v # DEBUG'd -- TODO: not yet implemented in Tiddler class 108 pass # DEBUG 109 -
Trunk/association/services/pluginLibrary/test/bar/adipisicing.js
r6427 r6447 1 consectetur 1 /*** 2 2 adipisicing 3 ***/ -
Trunk/association/services/pluginLibrary/test/bar/consectetur.js
r6427 r6447 1 /*** 1 2 consectetur 2 adipisicing 3 ***/
