diff --git a/classifier/README.txt b/classifier/README.txt index db42ea7..684f468 100644 --- a/classifier/README.txt +++ b/classifier/README.txt @@ -82,7 +82,7 @@ and follow the classifier step by step. extractor: filename >>> infoSet - {'filename': 'cust_im_contract_webbg_20071015.txt'} + {'filename': 'cust_im_contract_webbg_20071015'} Let's now use the sample analyzer - an example that interprets very carefully the underscore-separated parts of the filename. diff --git a/classifier/base.py b/classifier/base.py index 0c9c4ed..bd2d37a 100644 --- a/classifier/base.py +++ b/classifier/base.py @@ -53,7 +53,7 @@ class Classifier(AdapterBase): _contextAttributes = list(IClassifier) + list(IConcept) - logLevel = 5 + logLevel = 99 # 99 don't log; 5 minimal logging; 0 full logging @Lazy def conceptManager(self): diff --git a/knowledge/configure.zcml b/knowledge/configure.zcml index 28f93b9..6c321d1 100644 --- a/knowledge/configure.zcml +++ b/knowledge/configure.zcml @@ -80,4 +80,8 @@ + + + + diff --git a/knowledge/glossary/__init__.py b/knowledge/glossary/__init__.py new file mode 100755 index 0000000..4bc90fb --- /dev/null +++ b/knowledge/glossary/__init__.py @@ -0,0 +1,4 @@ +""" +$Id$ +""" + diff --git a/knowledge/glossary/browser.py b/knowledge/glossary/browser.py new file mode 100755 index 0000000..ec6d52a --- /dev/null +++ b/knowledge/glossary/browser.py @@ -0,0 +1,37 @@ +""" +Demonstration view. + +$Id$ +""" + + +from zope.cachedescriptors.property import Lazy +from zope.app.pagetemplate import ViewPageTemplateFile + +from loops.browser import common +from loops.browser.concept import ConceptRelationView +from loops.common import adapted +from loops import util + + +template = ViewPageTemplateFile('view_macros.pt') +conceptMacrosTemplate = common.conceptMacrosTemplate + + +class GlossaryItemView(common.BaseView): + + @Lazy + def macro(self): + return template.macros['glossaryitem'] + + @Lazy + def conceptMacros(self): + return conceptMacrosTemplate.macros + + @Lazy + def children(self): + rels = sorted(self.context.getChildRelations(), + key=(lambda x: x.second.title.lower())) + for r in rels: + yield ConceptRelationView(r, self.request, contextIsSecond=True) + diff --git a/knowledge/glossary/configure.zcml b/knowledge/glossary/configure.zcml new file mode 100755 index 0000000..bf1cdb4 --- /dev/null +++ b/knowledge/glossary/configure.zcml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/knowledge/glossary/view_macros.pt b/knowledge/glossary/view_macros.pt new file mode 100755 index 0000000..922f474 --- /dev/null +++ b/knowledge/glossary/view_macros.pt @@ -0,0 +1,17 @@ + + + + + + +
siehe: + + + Topic + , + +
+ +