Difference between revisions of "Template:Ipynb"

From ICPWiki
Jump to: navigation, search
Line 1: Line 1:
<includeonly>{{#ifexist: Media:{{{1}}}|{{SERVER}}/~icp/mimetype-icons/ipynb.png[http://nbviewer.ipython.org/url/{{SERVERNAME}}{{localurl:Media:{{{1}}}}} {{{2|{{{1}}}}}}] ({{#mediasize:{{{1}}}}})[[Image:Info_circle.png|link=File:{{{1}}}]]|[[Media:{{{1}}}|{{{2|{{{1}}}}}}]] (<span class="error">file does not exist!</span>)}}
+
<includeonly>{{#ifexist: Media:{{{1}}}|{{SERVER}}/~icp/mimetype-icons/ipynb.png[http://nbviewer.ipython.org/url/{{SERVERNAME}}{{filepath:Media:{{{1}}}}} {{{2|{{{1}}}}}}] ({{#mediasize:{{{1}}}}})[[Image:Info_circle.png|link=File:{{{1}}}]]|[[Media:{{{1}}}|{{{2|{{{1}}}}}}]] (<span class="error">file does not exist!</span>)}}
* {{filepath:Media:{{{1}}}}}
+
({{#replace:{{filepath:Media:{{{1}}}}}|http://|}})
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
This template can be used to include links to downloadable files.  
 
This template can be used to include links to downloadable files.  

Revision as of 12:44, 9 April 2014

This template can be used to include links to downloadable files.

Usage

{{IPython|notebook|linktext}}

filename
The name of the notebook file.
linktext
The link text of the link to the notebook viewer.

Examples