蝉鸣是什么季节| 放浪形骸是什么意思| 腹腔积水是什么原因造成的| 肺气肿吃什么药| 哪吒妈妈叫什么| 黄疸高有什么危害| 宫颈肥大是什么原因造成的| 玉米糁是什么| 黄泉路什么意思| 什么有什么造句| 体内湿气重吃什么食物| 吃什么生精养精最快| 什么东西最隔音| bq是什么意思| 停止长高有什么征兆| 猴子偷桃是什么意思| 乌鸡炖什么好吃| 后背发麻是什么原因| 女人来月经有血块是什么原因| 起床眼睛肿是什么原因| 刚怀孕吃什么最好最营养| 脾虚湿盛吃什么中成药| 男生下巴长痘痘是什么原因| dw是什么牌子| 润滑油可以用什么代替| 鲁迅原名是什么| 宝宝辅食虾和什么搭配| 小孩肚脐眼周围疼是什么原因| 养血清脑颗粒治什么病| 独立户口需要什么条件办理| 号外是什么意思| 去脂体重什么意思| 豆柏是什么| 百忧解是什么药| 伊字五行属什么| 医院介入科是干什么的| 农字五行属什么| 黑科技是什么意思| 7月5日是什么日子| 1020是什么星座| 晚上多梦是什么原因| 四大皆空是什么意思| 英国为什么叫日不落帝国| 吐白痰是什么原因| 释怀和释然有什么区别| 仙草是什么草| 张什么舞什么| 胃酸胃胀吃什么药| 女人高潮是什么感觉| 疯马皮是什么皮| 豆绿色配什么颜色好看| 兔死狐悲是什么生肖| 呼吸胸口疼是什么原因| 一个田一个比念什么| 壁细胞主要分泌什么| 什么颜色显肤色白| 什么是寓言故事| 喝酒断片是什么原因| 大便黑色的是什么原因| 红颜是什么意思| 低密度结节是什么意思| 宫颈柱状上皮外移是什么意思| 润喉咙什么东西最合适| 什么花不能浇硫酸亚铁| 杭州有什么好吃的| 上火引起的喉咙痛吃什么药| 月子病是什么症状| 为什么会缺钾| 肌层回声欠均匀是什么意思| 穆萨是什么意思| 办护照需要什么证件| 露酒是什么意思| 漫山遍野是什么生肖| 感冒吃什么消炎药效果好| 淋巴结挂什么科| 木林森属于什么档次| 吃虾不能吃什么水果| 喉咙痛有什么好办法| 5月25日是什么星座| 身经百战是什么意思| 肺结节吃什么| cache是什么意思| 鸡翅木是什么木| 八一是什么节| 凤鸾是什么意思| kitty什么意思| 手掌发热是什么原因| burberry什么牌子| 石青色是什么颜色| 大熊猫是什么科| 桃子吃多了有什么坏处| 群体是什么意思| 神经性皮炎用什么药膏好| nylon是什么面料成分| 宝宝咳嗽吃什么药好| 云南在古代叫什么| 艺五行属性是什么| 1969年属鸡是什么命| 霜对什么| 梦到自己生病了什么意思| 云彩像什么| 总是放屁是什么原因| 头晕冒冷汗是什么原因| 无花果什么季节吃| 行了是什么意思| 吐鲁番为什么那么热| 1983属什么| 血常规是什么| 什么布剪不断| 手脚心热是什么原因| 灯五行属什么| 猫咖是什么| 内疚是什么意思| 不昧因果是什么意思| 少许是什么意思| 为什么会长粉刺| 石女是什么意思| 肛周脓肿吃什么药| 发烧看什么科室| 一什么牛肉| 香槟酒属于什么酒| 赫依病是什么病| 腰眼疼是什么原因引起的| 深圳市市长是什么级别| 现在什么手机好用| 末法时代是什么意思| 12月14号是什么星座| 鱼饼是什么做的| 脐疝是什么| 10015是什么电话| 螯合是什么意思| 农历五月二十是什么星座| 香薰是什么| 就寝是什么意思| 睡前吃什么有助于睡眠| 酒是什么时候发明的| 菊花有什么功效和作用| 经常吃紧急避孕药有什么危害| 什么时间量血压最准确| 人中龙凤是什么意思| 澳门买什么最便宜| 医生说忌辛辣是指什么| 射线是什么| 烫伤用什么消毒| 出球小动脉流什么血| 中医学专业学什么| 瘢痕子宫是什么意思| 兵马俑什么时候发现的| 什么时候受孕率最高| 秉承是什么意思| 护士还能从事什么工作| 眼睛红肿是什么原因| 胰岛素有什么副作用| 高压低是什么原因引起的| 淋巴瘤是什么症状| 鸡精和鸡粉有什么区别| 肾虚吃什么食物好| 雍正叫什么名字| 取环后应该注意什么| 甘油三酯高用什么药好| 3岁宝宝流鼻血是什么原因| 洋葱有什么好处| 鸡拉稀吃什么药| 姗字五行属什么| 雷同是什么意思| 胰尾显示不清什么意思| 志字五行属什么| 梦见撒尿是什么意思| 舌头咬破了用什么药| 金蝉脱壳比喻什么| 螃蟹和什么不能一起吃| 大伽是什么意思| 拌黄瓜需要什么调料| 什么的红枣| 膝盖疼看什么科| 绝经后子宫内膜增厚是什么原因| 农历5月是什么星座| 长期腹泻是什么病| 你是我的楼兰是什么意思| 蠓虫叮咬后涂什么药膏| 慢性炎症是什么| 病毒性疣是什么病| 5.21什么星座| acer是什么牌子| 地级市市长是什么级别| 惭愧的意思是什么| 拍肺部片子挂什么科| 咳嗽吃什么好得快| 朱砂是什么东西| 红皮鸡蛋和白皮鸡蛋有什么区别| 平扫是什么意思| 还是什么结构的字| 曼波是什么意思| tt是什么| 心脏房颤是什么症状| 佛是什么生肖| 什么糖最甜| 吃玉米有什么好处| 智齿冠周炎吃什么消炎药| 点痦子去医院挂什么科| 什么的东风填词语| 处女座和什么座最配| 脱脂牛奶是什么意思| 战狼三什么时候上映| 鼻炎是什么| 埋线是什么| 阳虚是什么意思| 血液属于什么组织| 属鼠的和什么属相相克| 心脏搭桥是什么病| 莲花和荷花有什么区别| 高危行为是什么意思| coscia是什么品牌| 三点水一个兆读什么| 减肥什么方法有效| 公诉是什么意思| 文字属于五行属什么| 什么饮料不含糖| 腰椎疼痛挂什么科| 龟头炎用什么药| 属蛇和什么属相相冲| beacon什么意思| 吃什么可以增加抵抗力和免疫力| 鉴黄师是什么职业| 过奖了是什么意思| 平均血小板体积偏低是什么意思| 赛诺菲是什么药| 什么是适度水解奶粉| 泰迪哼哼唧唧表示什么| 做梦梦见死去的亲人是什么意思| 卵巢保养吃什么好| x片和ct有什么区别| 黄瓜为什么是绿色的| 导管是什么意思| 为什么有的人招蚊子| 贫血做什么检查能查出来| 检查肛门挂什么科| 宜家宜室什么意思| 口爆什么意思| 小孩肚子疼挂什么科| 平均血红蛋白含量偏低是什么意思| 阿迪达斯和三叶草有什么区别| 咽喉炎有什么症状| 痤疮是什么原因引起的| 拔完智齿吃什么消炎药| 下面有味道用什么药| 哪吒为什么叫哪吒| 什么是高情商| 治疗幽门螺杆菌用什么药效果最好| 姻亲是什么意思| 男人蛋疼是什么原因| 手指倒刺是什么原因| 防晒霜和隔离霜有什么区别| 手足口病要注意什么| bzd是什么意思| 江西景德镇有什么好玩的地方| 明天叫什么日子| st股票是什么意思| 湿热内蕴吃什么中成药| 做阴超有黄体说明什么| aq什么意思| 大名鼎鼎是什么意思| 高血糖喝什么茶好| 弓耳念什么| 百度Jump to content

48小时天气预报(2017-04-18)

Kufuma Wikipedia
百度 经查,此次事故的直接原因是大连石化公司第二联合车间三催化装置分馏单元原料油泵驱动端轴承异常损坏,导致原料油泵剧烈振动,造成密封波纹管多处断裂,引起油料泄漏着火。

This module contains functions to find the target of a redirect page.

The main function accepts the name of a single page. It determines if the page is a redirect; if so it looks up the page, extracts the target, and returns the target name as text. Its usage is {{#invoke:redirect|main|page-name}}. If page-name does not exist or is not a redirect then page-name is returned. If page-name is blank then blank is returned.

The function normally neither takes nor gives square brackets, so to show the result as a link use [[{{#invoke:redirect|main|page-name}}]].

If the parameter bracket is given a nonblank value, brackets will be passed on if present.

Examples

[kulemba source]
  • {{#invoke:redirect|main|WP:AFC}} → Wikipedia:AFC
  • {{#invoke:redirect|main|[[WP:AFD]]|bracket=yes}}Wikipedia:Articles for deletion
  • {{#invoke:redirect|main|Wikipedia:Articles for deletion}} → Wikipedia:Articles for deletion
  • {{#invoke:redirect|main|Wikipedia:Articles for rumination}} → Wikipedia:Articles for rumination

Note: WP:AFC and WP:AFD are both redirects, but Wikipedia:Articles for deletion is not, and Wikipedia:Articles for rumination does not exist.

If you want to use the main function from another Lua module, you may want to use the luaMain function. This provides the same functionality as the main function, but doesn't require that a frame object be available.

To use this, first load the module.

local mRedirect = require('Module:Redirect')

Then use the function with the following syntax:

mRedirect.luaMain(rname, bracket)

rname is the name of the redirect page, and if bracket is anything but false or nil, the module will produce a link rather than just a page name.

IsRedirect

[kulemba source]

The isRedirect function is used from wiki pages to find out if a given page is a redirect or not. If the page is a redirect, the function returns "yes", and if not the output is blank. Its usage is {{#invoke:redirect|isRedirect|page-name}}.

Examples

[kulemba source]
  • {{#invoke:redirect|isRedirect|WP:AFC}}
  • {{#invoke:redirect|isRedirect|Wikipedia:Articles for deletion}}
  • {{#invoke:redirect|isRedirect|Wikipedia:Articles for rumination}}

LuaIsRedirect

[kulemba source]

The isRedirect can be accessed from other Lua modules in the same way as the main function:

local mRedirect = require('Module:Redirect')
mRedirect.luaIsRedirect(rname)

GetTarget

[kulemba source]

The getTarget function fetches the target page name of a redirect page, and is only usable from Lua. If the page specified is a redirect, then the target is returned; otherwise the function returns nil.

To use it, first load the module.

local mRedirect = require('Module:Redirect')

Then use the function with the following syntax:

mRedirect.getTarget(page)

page can be either the name of the redirect page as a string, or a mw.title object.

See also

[kulemba source]

-- This module provides functions for getting the target of a redirect page.

local p = {}

-- Gets a mw.title object, using pcall to avoid generating script errors if we
-- are over the expensive function count limit (among other possible causes).
local function getTitle(...)
	local success, titleObj = pcall(mw.title.new, ...)
	if success then
		return titleObj
	else
		return nil
	end
end

-- Gets the name of a page that a redirect leads to, or nil if it isn't a
-- redirect.
function p.getTargetFromText(text)
	local target = string.match(
		text,
		"^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]"
	) or string.match(
		text,
		"^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]"
	)
	return target and mw.uri.decode(target, 'PATH')
end

-- Gets the target of a redirect. If the page specified is not a redirect,
-- returns nil.
function p.getTarget(page, fulltext)
	-- Get the title object. Both page names and title objects are allowed
	-- as input.
	local titleObj
	if type(page) == 'string' or type(page) == 'number' then
		titleObj = getTitle(page)
	elseif type(page) == 'table' and type(page.getContent) == 'function' then
		titleObj = page
	else
		error(string.format(
			"bad argument #1 to 'getTarget'"
				.. " (string, number, or title object expected, got %s)",
			type(page)
		), 2)
	end
	if not titleObj then
		return nil
	end
	local targetTitle = titleObj.redirectTarget
	if targetTitle then
		if fulltext then
			return targetTitle.fullText
		else
			return targetTitle.prefixedText
		end
	else
		return nil
	end
end

--[[
-- Given a single page name determines what page it redirects to and returns the
-- target page name, or the passed page name when not a redirect. The passed
-- page name can be given as plain text or as a page link.
--
-- Returns page name as plain text, or when the bracket parameter is given, as a
-- page link. Returns an error message when page does not exist or the redirect
-- target cannot be determined for some reason.
--]]
function p.luaMain(rname, bracket, fulltext)
	if type(rname) ~= "string" or not rname:find("%S") then
		return nil
	end
	bracket = bracket and "[[%s]]" or "%s"
	rname = rname:match("%[%[(.+)%]%]") or rname
	local target = p.getTarget(rname, fulltext)
	local ret = target or rname
	ret = getTitle(ret)
	if ret then
		if fulltext then
			ret = ret.fullText
		else
			ret = ret.prefixedText
		end
		return bracket:format(ret)
	else
		return nil
	end
end

-- Provides access to the luaMain function from wikitext.
function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
	return p.luaMain(args[1], args.bracket, args.fulltext) or ''
end

-- Returns true if the specified page is a redirect, and false otherwise.
function p.luaIsRedirect(page)
	local titleObj = getTitle(page)
	if not titleObj then
		return false
	end
	if titleObj.isRedirect then
		return true
	else
		return false
	end
end

-- Provides access to the luaIsRedirect function from wikitext, returning 'yes'
-- if the specified page is a redirect, and the blank string otherwise.
function p.isRedirect(frame)
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
	if p.luaIsRedirect(args[1]) then
		return 'yes'
	else
		return ''
	end
end

return p
开店需要什么手续 老人爱睡觉什么征兆 世界上最多笔画的字是什么字 凌晨三四点是什么时辰 血压低什么原因造成的
胃息肉有什么症状 cot什么意思 圆明园是什么时候被烧的 脉弦是什么意思和症状 建兰什么时候开花
感冒咳嗽可以吃什么水果 2段和3段奶粉有什么区别 五彩斑斓的意思是什么 主任是什么级别 为什么不建议小孩吃罗红霉素
鱼香肉丝用什么肉 丸吞是什么意思 肠道菌群失调吃什么药 血管堵塞吃什么药 智商135是什么水平
欧诗漫是个什么档次aiwuzhiyu.com 梦见大蜘蛛是什么预兆hcv8jop9ns9r.cn 逆爱是什么意思hcv9jop6ns5r.cn 漏尿是什么原因造成的hcv9jop3ns9r.cn 宜家宜室什么意思hcv9jop2ns4r.cn
一饿就心慌是什么原因引起的520myf.com 缓解是什么意思cl108k.com 梦见吃葡萄是什么意思hcv8jop5ns1r.cn 左眼皮老跳是什么原因hcv7jop6ns5r.cn ais是什么意思hanqikai.com
排班是什么意思hcv7jop6ns3r.cn 九月七日是什么星座hcv8jop4ns0r.cn 做免疫组化意味什么jinxinzhichuang.com nt是什么币hcv9jop4ns7r.cn review是什么意思hcv9jop4ns8r.cn
入户口需要什么资料hcv9jop4ns5r.cn 什么样的人容易中风hcv9jop5ns0r.cn 尿道炎挂什么科hcv8jop7ns9r.cn 多喝水有什么好处坏处hcv9jop1ns4r.cn 给产妇送什么礼物好cl108k.com
百度