请输入您要查询的百科知识:

 

词条 Module:NVR/rules
释义

local p = {}

-- rules for transforming links to a ship in the Naval Vessel Register

p.ShipRules = {

urls = {

['old'] = 'http://www.nvr.navy.mil/NVRSHIPS/DETAILS/****.HTM',

['new'] = 'http://www.nvr.navy.mil/SHIPDETAILS/SHIPSDETAIL_****.HTML',

},

rules = {

{

method = 'literal',

match = 'MAINE',

replace = '939',

url = 'new',

},

{

method = 'literal',

match = 'MARCOS',

replace = '940',

url = 'new',

},

{

method = 'literal',

match = 'OLDIRON',

replace = '1315',

url = 'new',

},

{

method = 'literal',

match = 'AFSB15',

replace = 'AFSB_(I)_15',

url = 'new',

},

{

method = 'pattern',

match = '^[A-Z]+[0-9]+$',

pattern = '^([A-Z]+)([0-9]+)$',

replace = '%1_%2',

url = 'new',

},

{

method = 'all',

url = 'new',

},

}

}

-- rules for transforming links to a service craft in the Naval Vessel Register

p.ServiceCraftRules = {

urls = {

['old'] = 'http://www.nvr.navy.mil/NVRSERVICECRAFT/DETAILS/****.HTM',

['new'] = 'http://www.nvr.navy.mil/SHIPDETAILS/SHIPSDETAIL_****.HTML',

},

rules = {

{

method = 'literal',

match = 'AFDB7_1',

replace = 'AFDB_7',

url = 'new',

},

{

method = 'literal',

match = 'AFDB1_1',

url = 'old',

},

{

method = 'literal',

match = 'AFDB1_3',

url = 'old',

},

{

method = 'literal',

match = 'AFDB1_4',

url = 'old',

},

{

method = 'literal',

match = 'AFDB7_2',

url = 'old',

},

{

method = 'pattern',

match = '^[A-Z]+[0-9]+$',

pattern = '^([A-Z]+)([0-9]+)$',

replace = '%1_%2',

url = 'new',

},

{

method = 'all',

url = 'new',

},

}

}

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/13 18:20:59