Attachment 'GithubGist.py'

Download

   1 # -*- coding: utf-8 -*-
   2 # Author: Igor Támara igor@tamarapatino.org
   3 # Date: 14/09/2015
   4 # No warranties.
   5 """
   6   MoinMoin - Gist github
   7   Embeds a gist github inside moinmoin
   8 
   9   Inputs: Receieves a Github URL containing a gist
  10 
  11   For instance:
  12   <<GithubGist(https://gist.github.com/ikks/0075a7bcf8fe526ab4c3)>>
  13 
  14   would show the given gist using the Embed URL.
  15 
  16 """
  17 
  18 
  19 def execute(macro, args):
  20     if not args.startswith('https://gist.github.com/'):
  21         return "you must offer something that starts with https://gist.github."
  22     return macro.formatter.rawHTML(
  23         '<script src="{0}.js"></script>'.format(args)
  24     )

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] (2014-09-14 18:15:38, 0.6 KB) [[attachment:GithubGist.py]]
 All files | Selected Files: delete move to page copy to page

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