跳转到内容

用户:Alexbot/CPLF-process

维基百科,自由的百科全书

CPLF=Cross-project link fix is a planning bot script of Alexbot.

“跨计划连接修复”,是本机器人执行计划的其中之一。

这个程式是做什么的? / What is this script do?[编辑]

检查,修复或移除页面内文中的跨计划连结。

Check the texts in page, and fix or remove cross-project link.

原理[编辑]

(Sorry I can't use english to explain others)

读取页面→抓取所有[[a|b]]中的a→如果符合为跨计划连结(ex:[[:w:(*)]] or [[:n:(*)]])→连至该计划中并检查该页面→
→如果页面不存在→移除该连结,只留下b。
→如果存在→不需动作
→如果为重定向→抓取该页面取得重定向目标→更新本地文字

(English :-P)

Read page source -> Grab all the "a" with in [[a|b]] -> look for interwiki link matches (e.g. [[:w:(*)]] or [[:n:(*)]]) -> move on to the respective wiki -> remove the link if "a" does not exist in that wiki /or/ correct "a" if its a redirection page.