Template talk:Fgaddon aircraft source
Tarball and path parameters needed
When applying this template to various articles I quickly see that many of them also links to a tarball (this is also evident if looking at Special:LinkSearch/*.sourceforge.net. We could probably add a parameter, tarball= that when not empty will make the template link to the tarball instead of the aircraft directory.
A path parameter is also needed. See Template talk:Repo link#Todo list
—Johan G (Talk | contribs) 06:33, 16 September 2015 (EDT)
- Unfortunately the tar archive functionality for the FGAddon svn repository is not functional. Maybe the SourceForge staff need to be notified of this bug. Anyway, this is only used by 3 aircraft. If this is fixed, I plan on creating a {{fgaddon zip file}} template to match the other {{* zip file}} subtemplates of {{repo link}}. This will also be accessible from the {{fgaddon source}} template when setting type = zip. It will be implemented directly in {{repo link}} as it is for GitHub and GitLab zip downloads.
The move from fgaddon url to fgaddon file
The main point of the template is to return the URL of an aircraft's directory at the FGAddon repository.
Perhaps if I had called it {{fgaddon aircraft url}} it would have been more obvious. ;-)
I think I originally intended it to be used for the development parameter (the URL to the development repository) in {{infobox aircraft}} templates on some aircraft pages, but thought it also could be useful to return an URL to separate files.
—Johan G (Talk | contribs) 04:18, 8 March 2016 (EST)
- I'm working on {{fgaddon url/sandbox}} to come up with a functional equivalent. The current
<URL>/<branch>/Aircraft/<aircraft>/<path>[@<r>][#l<l>]
construction is quite intuitive. Though it is very different to any of the other {{* url}} templates, or any of the {{repo link}} family members. Maybe a good organisation would be:- Use {{fgaddon url/sandbox}} for {{fgaddon url}} to provide a standard interface for direct URL creation. This would match the {{* source}} standardisation.
- Reserve the file link templates ({{* file}}) for the more unique templates.
- Recreate {{fgaddon file}} based on {{fgaddon source}}, but with the usage changed from:
- {{fgaddon file|aircraft|path|r=|b=|l=|file=}}
- to maybe:
- {{fgaddon file|aircraft|path|file=|cmd=|opt=|protocol=|login=|type=|branch=|commit=|line=|view=|text=|}}
- i.e. The aircraft and path parameters are preserved and are used to construct the {{repo link}} path parameter. And the file parameter is also preserved, and being set will cause the {{repo link}} text parameter to be constructed. I can then alias r = c = commit, b = branch, and l = line. This should mimic the current behaviour and not break any linking pages. I'll try something in {{fgaddon file/sandbox}}.
- Originally I was thinking of creating a {{* file}} set of templates using only the {{repo link}} parameters protocol, type, user, proj, repo, branch, tag, commit, line, view, text, pre, simplepath, and full. But this is a little redundant with the other family members, so I might drop that idea.
- The template {{fgaddon file/sandbox}} is complete. As you can see, the behaviour of the original {{fgaddon url}} template is mimicked perfectly. Johan, if you agree, I propose the following for zero disruptions:
- Switch {{fgaddon file}} to the content of {{fgaddon file/sandbox}}.
- Convert all usage of {{fgaddon url}} to {{fgaddon file}} throughout the wiki (currently 23 pages).
- Switch {{fgaddon url}} to the content of {{fgaddon url/sandbox}}.
- One reason for this would be because the old {{fgaddon url}} template cannot produce non-web URLs such as
ssh://<username>@git.code.sf.net/u/<username_leader>/code-ornithopter/
, as used in FGAddon. And the template produces not only URLs, but Mediawiki links as well. Or an alternative:- Rename {{fgaddon file/sandbox}} to {{fgaddon aircraft url}}. This would be to differentiate it as a shortcut compared to the rest of the {{* url}} templates.
- Convert all usage of {{fgaddon url}} to {{fgaddon aircraft url}} throughout the wiki (currently 23 pages).
- Switch {{fgaddon url}} to the content of {{fgaddon url/sandbox}}.
- I could then convert the {{flightgear file}}, {{simgear file}}, and {{fgdata file}} templates in the same way to be subtemplates of {{repo link}} (though switching to {{flightgear source}}, {{simgear source}}, and {{fgdata source}} and depreciating these might be better).
- After skimming through the examples I think both {{fgaddon file/sandbox}} and {{fgaddon url/sandbox}} look good.
- To complicate things slightly, ;-) how about the following?
- Switching {{fgaddon file}} to the content of {{fgaddon file/sandbox}}
- Moving that template to {{fgaddon source}} for consistency
- Switching {{fgaddon url}} to the content of {{fgaddon url/sandbox}}
- Moving that template to {{fgaddon aircraft url}} to make its use less ambiguous
- —Johan G (Talk | contribs) 09:26, 9 March 2016 (EST)
- Thinking more about the organisation of the {{repo link}} family of templates, I might have a better idea :) If you have a look at the other FlightGear {{* source}} templates, you'll see that the usage of the current set of templates is an identical match (for example {{fgaddon source}} vs. {{flightgear source}}). This is the same with the {{* url}} set of templates, for example {{fgaddon url/sandbox}} vs. {{flightgear url}}. The only set of templates that are not consistent are the {{* file}} templates. The idea of the aircraft, path, and file parameters, as used in {{fgaddon file/sandbox}} to construct the {{repo link}} master parameters path, text, and full, could be expanded to match the other templates sets. Maybe we could have:
- {{fgaddon aircraft source}} - as the content of {{fgaddon file/sandbox}}, which matches the behaviour of your original {{fgaddon url}} template, but with many new {{repo link}} options.
- {{fgaddon aircraft url}} - this is the same as {{fgaddon aircraft source}} but with the parameter value full = 1, and all text construction parameters dropped. It produces pure URLs and no Mediawiki links. It could transclude {{fgaddon aircraft source}} to allow that template to do the parameter remapping, rather than transcluding {{repo link}} and duplicating the parameter mapping.
- This might be nicer for organisation and consistency, rather than dumping this into the {{* file}} mixed bag category. This would allow the file parameter to be dropped. So where you would like file = yes, you would use {{fgaddon aircraft source}}. And for file = no, you would use {{fgaddon aircraft url}}. For such an organisation, it would be good to preserve the history as {{fgaddon url}} → {{fgaddon file}} → {{fgaddon aircraft source}}.
- Thinking more about the organisation of the {{repo link}} family of templates, I might have a better idea :) If you have a look at the other FlightGear {{* source}} templates, you'll see that the usage of the current set of templates is an identical match (for example {{fgaddon source}} vs. {{flightgear source}}). This is the same with the {{* url}} set of templates, for example {{fgaddon url/sandbox}} vs. {{flightgear url}}. The only set of templates that are not consistent are the {{* file}} templates. The idea of the aircraft, path, and file parameters, as used in {{fgaddon file/sandbox}} to construct the {{repo link}} master parameters path, text, and full, could be expanded to match the other templates sets. Maybe we could have:
- I think that would be a great idea. I guess that way {{fgaddon aircraft url}} would be dead easy to maintain (and other {{* url}} templates built that way).
- I also like the idea of preserving the history.
- —Johan G (Talk | contribs) 12:46, 9 March 2016 (EST)
- Done, the conversion is complete! The {{repo link}} family of templates are now much more consistent. I have noticed two locked wiki pages that use the old {{fgaddon file}} template. These are FlightGear Newsletter February 2016 and De/FlightGear Newsletter Februar 2016. Could these be converted to {{fgaddon aircraft source}}, so that {{fgaddon file}} could be deleted?
- Done
- Red Leader (Talk, contribs) 12:43, 10 March 2016 (EST)