Template talk:Fgaddon aircraft source

From FlightGear wiki
Jump to navigation Jump to search

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.
Bugman (talk) 15:58, 7 March 2016 (EST)

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.
Bugman (talk) 05:36, 8 March 2016 (EST)
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:
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:
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).
Bugman (talk) 10:34, 8 March 2016 (EST)
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?
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:
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}}.
Bugman (talk) 11:13, 9 March 2016 (EST)
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?
Bugman (talk) 08:54, 10 March 2016 (EST)
Done Done
Red Leader (Talk, contribs) 12:43, 10 March 2016 (EST)