Template:Repo link/doc infrastructure url

From relax wiki
< Template:Repo link
Revision as of 13:41, 23 October 2020 by Bugman admin (talk | contribs) (Switch from the imported {{informative template}} to the relax {{template info}} template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template documentation

Goal

This template is for creating direct URLs for the content of the version control repositories of the MISSING open source infrastructure. This is equivalent to the {{MISSING source}} template with the full parameter set to 1. It is a subtemplate of the master {{repo link}} template designed to be specific for the MISSING repositories.

Usage

{{MISSING url
| cmd        =
| opt        =
| type       =
| proj       =
| repo       =
| branch     =
| tag        =
| commit     =
| path       =
| line       =
| post       =
| view       =
}}

The proj parameter, as well as the repo parameter, must be supplied. All other parameters are optional.

Parameter Description Abbreviated
parameter
Numbered
parameter
Status
cmd An optional command line tool name + options to prepend to the URL. For example git clone. optional
opt Any additional options to show after cmd, but before the URL.
Note The separation of cmd and opt is for future non-CLI handling of a standardised set of cmd parameter values
optional
type Choose between the web interface or a direct repository link. This can be one of. The default is svn web. optional
proj The name of the project, consisting of a grouping of repositories on the open source infrastructure. p 1 mandatory
repo The name of the repository. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. r 2 mandatory
branch The branch name. b 3 optional
tag The repository tag name. t optional
commit The commit identifier. c 5 optional
path The file or directory path. f 4 optional
line The line number(s) of the file to display. l optional
post Text to append. This is forms a set with the parameter cmd and opt. For example it can represent any command line options that come after the URL. optional
view View to display: v optional

Design

In this section, the following notation will be used:

Angular brackets + lower case text <xyz>
Template parameters.
Angular brackets + upper case text <XYZ>
Template constructed text.
Square brackets [xyz]
Optional text, only added if the parameter is set.
Or symbol |
The value on the left, if present, otherwise the value on the right of the symbol.

Overview

The general design is:

<cmd> <opt> <URL> <post>

Plain text

To create a URL or link as plain text and avoid external links, simply use the {{#tag:tagname|content}} magic word construct:

{{#tag:nowiki|
  {{repo link
  | full = 1
  }}
}}

https://sourceforge.net/p/nmr-relax/code/ci/master/tree/

To use the <code> tags:

{{#tag:code|{{#tag:nowiki|
  {{repo link
  | full = 1
  }}
}}}}

https://sourceforge.net/p/nmr-relax/code/ci/master/tree/

Examples

Related templates