<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ANaval_Vessel_Register_URL%2Fdoc</id>
	<title>Module:Naval Vessel Register URL/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ANaval_Vessel_Register_URL%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;action=history"/>
	<updated>2026-06-17T05:37:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;diff=478782&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;diff=478782&amp;oldid=prev"/>
		<updated>2021-07-16T05:04:11Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== Summary ==&lt;br /&gt;
This module generates links to ships in the Naval Vessel Register (nvr.navy.mil) database. Intended to be used by:&lt;br /&gt;
*{{tlx|Naval Vessel Register URL}}&lt;br /&gt;
*{{tlx|Naval Vessel Register service craft URL}}&lt;br /&gt;
&lt;br /&gt;
NVR have adopted a file naming convention based on a ship's [[hull classification symbol]] with an appended underscore and some number of digits.  The extra digits do not seem to follow an identifiable pattern so the former rules-based system used here no longer works.&lt;br /&gt;
&lt;br /&gt;
To get round the 'new' file format, this version of the module adopts a brute-force mechanism by using a local database that maps a ship's hull classification symbol to its associated NVR file name.  The database is two large Lua tables maintained at [[Module:Naval Vessel Register URL/data]].&lt;br /&gt;
&lt;br /&gt;
== Using this module from templates ==&lt;br /&gt;
&lt;br /&gt;
=== MakeShipLink ===&lt;br /&gt;
&lt;br /&gt;
This function returns a link to a ship's page at the Naval Vessel Register website.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|id=|title=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; — uses the calling template's parameters&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
: '''1''' or '''id''' — the ship's case-insensitive hull classification symbol in one of five forms:&lt;br /&gt;
:#SSBN-659 – the preferred format because it matches the format for hull classification symbols generally used for US Navy ships throughout Wikipedia&lt;br /&gt;
:#SSBN 659&lt;br /&gt;
:#SSBN659&lt;br /&gt;
:#SSBN_659&lt;br /&gt;
:#SSBN_659_1635 – the NVR file name format as of September 2017&lt;br /&gt;
::There are exceptions.  There are three ships listed at the NVR website that do not have hull classification symbols.  These are: {{USS|Constitution}}, {{USS|Maine|ACR-1|6}}, and {{USS|Texas|1892|6}}.  For these three ships, use the ship's name for this parameter.  The code word OLDIRON, previously used to identify ''Constitution'' is no longer supported.  &lt;br /&gt;
: '''2''' or '''title''' — A title or label for the link.&lt;br /&gt;
 &lt;br /&gt;
Examples:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|DDG_1000}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|DDG_1000}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|constitution}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|constitution}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|maine|USS ''Maine''}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|maine|USS ''Maine''}}&lt;br /&gt;
&lt;br /&gt;
=== MakeServiceCraftLink ===&lt;br /&gt;
&lt;br /&gt;
This function returns a link to a service craft in the Naval Vessel Register.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|id=|title=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; — uses the calling template's parameters&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
Parameters:&lt;br /&gt;
: '''1''' or '''id''' — the ship's case-insensitive hull classification symbol in one of five forms:&lt;br /&gt;
:#YTB-760 – the preferred format because it matches the format for hull classification symbols generally used for US Navy ships throughout Wikipedia&lt;br /&gt;
:#YTB 760&lt;br /&gt;
:#YTB760&lt;br /&gt;
:#YTB_760&lt;br /&gt;
:#YTB_760_5292 – the NVR file name format as of September 2017&lt;br /&gt;
::There are exceptions.  NVR has separate pages for some single and some multiple sections of some floating drydocks. For these, this module adopts a convention similarly used by NVR where each section is distinguished by a letter designator; that letter must be appended to the hull classification symbol used in this parameter; see the examples&lt;br /&gt;
: '''2''' or '''title''' — A title or label for the link. &lt;br /&gt;
Examples:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|AFDB-7F}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|AFDB7F}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|ytb-760}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|ytb-760|''Natick''}}&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>