This is a read-only mirror of pymolwiki.org

Difference between revisions of "Template:Infobox script-repo"

From PyMOL Wiki
Jump to navigation Jump to search
(box margin)
m (1 revision)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| cellspacing="0" cellpadding="3" style="width:300px; float:right; border:1px solid black; background-color: #ffe; margin: 0 0 10px 10px"
+
{| cellspacing="0" cellpadding="3" class="infobox"
 
|-
 
|-
 
! Type
 
! Type
| {{{type|Python Module}}}
+
| {{#switch: {{{type|script}}}
 +
  | module = [[Running Scripts#Python_Modules|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://raw.githubusercontent.com/Pymol-Scripts/Pymol-script-repo/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}}}]
 +
  | BSD-2-Clause
 +
  | BSD-3-Clause
 +
  | GPL-2.0
 +
  | GPL-3.0
 +
  | LGPL-2.1
 +
  | LGPL-3.0
 +
  | Python-2.0
 +
  | MIT    = [http://opensource.org/licenses/{{{license}}} {{{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: {{{homepage|}}}
|}
+
  | {{{homepage}}}<br>
<noinclude>
+
  |
 +
  }} {{#if: {{{filename|}}}
 +
  | This code has been put under version control in the project [[Git intro|Pymol-script-repo]]
 +
  |
 +
  }}
 +
|}<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 55:
 
}}
 
}}
 
</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 72:
 
<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 81:
 
<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    = [[User: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
 
}}
 
}}

Latest revision as of 03:24, 10 December 2018

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    = [[User:Speleo3|Thomas Holder]]
|license   = BSD
}}

If script is not in repo:

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