comparison decoupage/formatters.py @ 27:9e86c5cb111a

minor documentation updates
author k0s <k0scist@gmail.com>
date Mon, 18 Jan 2010 15:33:42 -0500
parents 6b27461955d1
children fc1c479296c3
comparison
equal deleted inserted replaced
26:f306089d6def 27:9e86c5cb111a
34 34
35 35
36 ### formatters 36 ### formatters
37 37
38 class Ignore(object): 38 class Ignore(object):
39 """ignore files of a certain pattern""" 39 """
40 ignore files of a glob patterns. These files will not be used in the index template.
41 e.g. /ignore = .* *.pdf # don't list dotfiles and PDFs
42 """
40 43
41 44
42 def __init__(self, ignore): 45 def __init__(self, ignore):
43 self.match = ignore.split() 46 self.match = ignore.split()
44 47
77 if f['description'] is not None: 80 if f['description'] is not None:
78 _files.append(f) 81 _files.append(f)
79 data['files'] = _files 82 data['files'] = _files
80 83
81 class Sort(object): 84 class Sort(object):
82 """ determines how to sort the files in a directory """ 85 """
86 determines how to sort the files in a directory;
87 right now only by case-insensitive alphabetically
88 * reverse : reverse the
89 """
83 def __init__(self, pattern): 90 def __init__(self, pattern):
84 self.args = [i.strip() for i in pattern.split(',')] 91 self.args = [i.strip() for i in pattern.split(',')]
85 92
86 def __call__(self, request, data): 93 def __call__(self, request, data):
87 94