Template:Fgaddon aircraft url
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft
Goal
This template is for creating direct URLs for files in the FGAddon svn version control repository. It is a subtemplate of the master {{repo link}} template designed to simplify the interface by being specific for the FGAddon repository and avoiding the need to supply the Aircraft/ directory.
Usage
{{fgaddon aircraft url
| aircraft
| path
| cmd =
| opt =
| protocol =
| login =
| type =
| branch =
| commit =
| line =
| post =
| view =
}}
The aircraft and path parameters are unique to this template and are used to construct the parent {{repo link}} template path parameter.
| Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
|---|---|---|---|---|
| aircraft | The aircraft directory name. The path is constructed as <branch>/Aircraft/<aircraft>. If empty, the path of <branch>/Aircraft/ will be used.
|
1 | optional | |
| path | The file path following from the aircraft directory name. The full file path will be constructed as <branch>/Aircraft/<aircraft>/<path>.
|
2 | optional | |
| cmd | An optional command line tool name + options to prepend to the URL. For example svn co. | optional | ||
| opt | Any additional options to show after cmd, but before the URL.
|
optional | ||
| protocol | The URL protocol, for example https, http, ssh, svn. This defaults to https. | optional | ||
| login | The optional user login. | optional | ||
| type | Choose between the web interface or a direct repository link. This can be one of svn, svn web. The default is svn web. | optional | ||
| branch | The branch name. As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. This defaults to trunk. | b | optional | |
| commit | The commit identifier (svn revision number). This defaults to HEAD. | c | 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 |
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://gitlab.com
To use the <code> tags:
{{#tag:code|{{#tag:nowiki|
{{repo link
| full = 1
}}
}}}}
https://gitlab.com
Examples
No parameters
{{fgaddon aircraft url}}
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft
Aircraft given
{{fgaddon aircraft url|737-200}}
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/737-200
Revision number given
{{fgaddon aircraft url|ec135|c=560}}
https://sourceforge.net/p/flightgear/fgaddon/560/tree/trunk/Aircraft/ec135
Branch name given
{{fgaddon aircraft url|B-1B|b=release-3.6.0}}
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/branches/release-3.6.0/Aircraft/B-1B
Path and line number given
{{fgaddon aircraft url|F-15|Nasal/fox2.nas}}
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/F-15/Nasal/fox2.nas
{{fgaddon aircraft url|F-15|f15c-set.xml|l=8}}
https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/F-15/f15c-set.xml#l8
Usage in a wiki URL
Note For this specific example, the {{fgaddon aircraft source}} template should really be used instead, e.g. {{fgaddon aircraft source|F-15|Nasal/fox2.nas|text=The F-15's missile system}}.
|
[{{fgaddon aircraft url|F-15|Nasal/fox2.nas}} The F-15's missile system]
File
{{fgaddon aircraft url
| wrightFlyer1903
| wrightFlyer1903-set.xml
}}
File and a branch
{{fgaddon aircraft url
| wrightFlyer1903
| wrightFlyer1903-set.xml
| branch = branches/release-2016.1
}}
File and a commit
{{fgaddon aircraft url
| 787-8
| Nasal/systems.nas
| commit = 1333
}}
https://sourceforge.net/p/flightgear/fgaddon/1333/tree/trunk/Aircraft/787-8/Nasal/systems.nas
File and line number
{{fgaddon aircraft url
| ornithopter
| ornithopter-set.xml
| line = 13
}}
File, line number, and commit
{{fgaddon aircraft url
| ornithopter
| ornithopter-set.xml
| commit = 3
| line = 10
}}
Full path
{{fgaddon aircraft url
| CRJ700-family
| CRJ900-set.xml
| commit = 1418
| line = 10
}}
Related templates
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||