Attachment 'Vimeo.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - Vimeo Macro    
   4     v 0.1 [2011-08]
   5     
   6     This macro allows you to include a Vimeo video.
   7     Syntax: <<Vimeo(25340759))>>
   8     
   9     @copyright: 2011 Franck Dernoncourt <franck.dernoncourt@gmail.com>
  10     @license: GNU GPL
  11 """
  12 
  13 from MoinMoin import wikiutil
  14 
  15 def execute(macro, id):
  16     _ = macro.request.getText   
  17     id = wikiutil.escape(id)
  18     html = u'''
  19     <iframe src="http://player.vimeo.com/video/%(vimeolink)s?title=0&amp;byline=0&amp;portrait=0" width="400" height="300" frameborder="0"></iframe>
  20     ''' % {"vimeolink": id}
  21     return macro.formatter.rawHTML(html)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-10-10 21:17:24, 0.6 KB) [[attachment:Vimeo.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.