Template:Infobox script-repo: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
(box margin)
(smart argument handling)
Line 2: Line 2:
|-
|-
! Type
! Type
| {{{type|Python Module}}}
| {{#switch: {{{type|script}}}
  | module = Python Module
  | plugin = [[Plugins|PyMOL Plugin]]
  | script = [[Running Scripts|Python Script]]
  | pml    = [[Running Scripts|PyMOL Script]]
  | {{{type}}}
  }}
|-
|-
! Download
! Download
| [https://github.com/Pymol-Scripts/Pymol-script-repo/raw/master/{{{filename}}} {{{filename}}}]
| {{#if: {{{filename|}}}
  | [https://github.com/Pymol-Scripts/Pymol-script-repo/raw/master/{{{filename}}} {{{filename}}}]
  | {{{download|}}}
  }}
|-
|-
! Author(s)
! Author(s)
Line 11: Line 20:
|-
|-
! License
! License
| {{{license|No license specified}}}
| {{#switch: {{{license|}}}
  | BSD    = [http://opensource.org/licenses/BSD-2-Clause {{{license}}}]
  | GPL    = [http://opensource.org/licenses/GPL-2.0 {{{license}}}]
  | LGPL  = [http://opensource.org/licenses/LGPL-2.1 {{{license}}}]
  | {{{license|}}}
  }}
|-
|-
|colspan="2" style="text-align:center; font-size:80%; background-color: #ddd"|This code has been put under version control in the project [[Git intro|Pymol-script-repo]]
|colspan="2" style="text-align:center; font-size:80%; background-color: #ddd"| {{#if: {{{filename|}}}
|}
  | This code has been put under version control in the project [[Git intro|Pymol-script-repo]]
<noinclude>
  |
  }}
|}<noinclude>
This is a info box for scripts in the Pymol-script-repo.
This is a info box for scripts in the Pymol-script-repo.
Eventually we could upgrade mediawiki with [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions Extension:ParserFunctions] and make this box more versatile.


== Usage ==
== Usage ==
Line 29: Line 44:
}}
}}
</pre>
</pre>
Argument '''type''' can be one of:
* module
* plugin
* script (for python script)
* pml (for python script)
* or some free description


The '''filename''' argument must match a file in the Pymol-script-repo.
The '''filename''' argument must match a file in the Pymol-script-repo.
If the script is ''not'' in the repo, the '''download''' argument can be provided as an alternative.
Some licenses (currently BSD, GPL and LGPL) are linked with <code>opensource.org/licenses</code> by default.


== Examples ==
== Examples ==
Line 36: Line 61:
<pre>
<pre>
{{Infobox script-repo
{{Infobox script-repo
|type      = PyMOL Plugin
|type      = plugin
|filename  = plugins/dynoplot.py
|filename  = plugins/dynoplot.py
|author    = Dan Kulp
|author    = Dan Kulp
Line 45: Line 70:
<pre>
<pre>
{{Infobox script-repo
{{Infobox script-repo
|type      = Python Module
|type      = module
|filename  = anglebetweenhelices.py
|filename  = anglebetweenhelices.py
|author    = [[Users:Speleo3|Thomas Holder]]
|author    = [[Users:Speleo3|Thomas Holder]]
|license  = BSD
}}
</pre>
If script is not in repo:
<pre>
{{Infobox script-repo
|type      = pml
|download  = please copy&paste script
|author    =
|license  = BSD
|license  = BSD
}}
}}

Revision as of 06:10, 11 December 2011

Type Python Script
Download
Author(s) anonymous
License

This is a info box for scripts in the Pymol-script-repo.

Usage

{{Infobox script-repo
|type      =
|filename  =
|author    =
|license   =
}}

Argument type can be one of:

  • module
  • plugin
  • script (for python script)
  • pml (for python script)
  • or some free description

The filename argument must match a file in the Pymol-script-repo. If the script is not in the repo, the download argument can be provided as an alternative.

Some licenses (currently BSD, GPL and LGPL) are linked with opensource.org/licenses by default.

Examples

{{Infobox script-repo
|type      = plugin
|filename  = plugins/dynoplot.py
|author    = Dan Kulp
|license   =
}}
{{Infobox script-repo
|type      = module
|filename  = anglebetweenhelices.py
|author    = [[Users:Speleo3|Thomas Holder]]
|license   = BSD
}}

If script is not in repo:

{{Infobox script-repo
|type      = pml
|download  = please copy&paste script
|author    = 
|license   = BSD
}}