00001
00002
00003 import os, string, mimetypes
00004 from MoinMoin import wikiutil
00005 from MoinMoin.action import AttachFile
00006
00007 def execute(macro, text):
00008 kw = {}
00009 if text:
00010 args=text.split(',')
00011 else:
00012 args=[]
00013
00014 fn = args[0]
00015 desc = fn
00016 if len(args) >= 2:
00017 desc = args[1]
00018
00019 return '<a href="?action=AttachFile&do=raw&target=%s">%s</a>' % (fn, desc)
00020
00021