Mercurial > public > src > moin > extensions
diff data/plugin/parser/text_x_arnica.py @ 53:64c2bb702530
text_x_arnica: filer renamed into file_regex
author | Reimar Bauer <rb.proj AT googlemail DOT com> |
---|---|
date | Wed, 04 Jun 2008 13:24:48 +0200 |
parents | 02f6a1e3acc3 |
children | 5e9898574b01 |
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py Wed Jun 04 13:23:41 2008 +0200 +++ b/data/plugin/parser/text_x_arnica.py Wed Jun 04 13:24:48 2008 +0200 @@ -34,7 +34,7 @@ parser_name = __name__.split('.')[-1] -def macro_arnica(macro, target_page=u'', columns=int(4), filter=u'.', +def macro_arnica(macro, target_page=u'', columns=int(4), file_regex=u'.', image_for_webnail=False, show_text=True, show_date=True, show_tools=True, sort_by_date=False, sort_by_name=True, sort_by_alias=False, @@ -48,7 +48,7 @@ @param target_page: page to read attachments from @param columns: number of columns for thumbnails - @param filter: regex to select images + @param file_regex: regex to select images @param image_for_webnail if set then the image is shown instead of the webnail @param show_text: default shows description @param show_date: default shows date from exif header if available @@ -79,7 +79,7 @@ from inspect import getargspec args, varargs, varkw, defaults = getargspec(macro_arnica) # XXX find the proper method do get the real values - defaults = (target_page, columns, filter, + defaults = (target_page, columns, file_regex, image_for_webnail, show_text, show_date, show_tools, sort_by_date, sort_by_name, sort_by_alias, @@ -484,8 +484,8 @@ else: all_files = os.listdir(path) - if self.filter != u'.': - all_files = [attfile for attfile in all_files if re.match(self.filter, attfile)] + if self.file_regex != u'.': + all_files = [attfile for attfile in all_files if re.match(self.file_regex, attfile)] if self.sort_by_name and self.only_items is False: all_files.sort()