翻訳と辞書
Words near each other


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

モジュール:PassArguments : ウィキペディア日本語版
モジュール:PassArguments
-- Simple Module that passes all arguments in the parent frame to a specified template
pa = ;
function pa.run( frame )
local template = frame.args.template or frame.args;
local pframe = frame:getParent();
local exclude = frame.args.exclude or '';
local exclude_list = ;
for val in string.gmatch( exclude, '
*' ) do
table.insert( exclude_list, val );
end

local result;
args = ;
for k,v in pairs( pframe.args ) do
local good = true;
for _, v2 in ipairs( exclude_list ) do
if k == v2 then
good = false;
end
end
if good then
args = v;
end
end

result = frame:expandTemplate( );

return result;
end
function pa.list( frame )
local template = frame.args.template or frame.args;
local pframe = frame:getParent();
local exclude = frame.args.exclude or '';
local exclude_list = ;
for val in string.gmatch( exclude, '
*' ) do
table.insert( exclude_list, val );
end

local result;
args = ;
for k,v in pairs( pframe.args ) do
local good = true;
for _, v2 in ipairs( exclude_list ) do
if k == v2 then
good = false;
end
end
if good then
table.insert( args, k .. '=' .. v );
end
end

-- result = '';
result = frame:preprocess('');

return result;
end
return pa


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「モジュール:PassArguments」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.