This repository has been archived by the owner on Sep 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
批量导入屏蔽用户
John Smith edited this page Apr 9, 2017
·
1 revision
假设你有一个文件,每行一个屏蔽用户名(末尾无空行)
屏蔽用户名1
屏蔽用户名2
本文描述了如何把这样的文件转为可导入贴吧管理器的格式
-
使用Notepad++打开这个文件
-
编码-转为 UTF-8 无 BOM 编码格式
-
搜索-替换(或按Ctrl+H)
查找模式选择正则表达式
查找目标:
^(.*)$
替换为:
<item>\r\n <value>\r\n <Name>屏蔽 \1</Name>\r\n <Conditions>\r\n <item>\r\n <value>\r\n <Name>关键词条件</Name>\r\n <Range>4</Range>\r\n <Not>0</Not>\r\n <Include>0</Include>\r\n <Keyword>\r\n <IsRegex>0</IsRegex>\r\n <Text>\1</Text>\r\n </Keyword>\r\n </value>\r\n </item>\r\n </Conditions>\r\n <ForceToConfirm>0</ForceToConfirm>\r\n <TrigCount>0</TrigCount>\r\n </value>\r\n </item>
点击全部替换
本步完成后文件内容应该会变成这样:
<item> <value> <Name>屏蔽 屏蔽用户名1</Name> <Conditions> <item> <value> <Name>关键词条件</Name> <Range>4</Range> <Not>0</Not> <Include>0</Include> <Keyword> <IsRegex>0</IsRegex> <Text>屏蔽用户名1</Text> </Keyword> </value> </item> </Conditions> <ForceToConfirm>0</ForceToConfirm> <TrigCount>0</TrigCount> </value> </item> <item> <value> <Name>屏蔽 屏蔽用户名2</Name> <Conditions> <item> <value> <Name>关键词条件</Name> <Range>4</Range> <Not>0</Not> <Include>0</Include> <Keyword> <IsRegex>0</IsRegex> <Text>屏蔽用户名2</Text> </Keyword> </value> </item> </Conditions> <ForceToConfirm>0</ForceToConfirm> <TrigCount>0</TrigCount> </value> </item>
-
在文件头部加上:
<?xml version="1.0" encoding="UTF-8"?> <RuleList> <RuleList>
在文件尾部加上:
</RuleList> </RuleList>
现在文件内容应该是这样的:
<?xml version="1.0" encoding="UTF-8"?> <RuleList> <RuleList> <item> <value> <Name>屏蔽 屏蔽用户名1</Name> <Conditions> <item> <value> <Name>关键词条件</Name> <Range>4</Range> <Not>0</Not> <Include>0</Include> <Keyword> <IsRegex>0</IsRegex> <Text>屏蔽用户名1</Text> </Keyword> </value> </item> </Conditions> <ForceToConfirm>0</ForceToConfirm> <TrigCount>0</TrigCount> </value> </item> <item> <value> <Name>屏蔽 屏蔽用户名2</Name> <Conditions> <item> <value> <Name>关键词条件</Name> <Range>4</Range> <Not>0</Not> <Include>0</Include> <Keyword> <IsRegex>0</IsRegex> <Text>屏蔽用户名2</Text> </Keyword> </value> </item> </Conditions> <ForceToConfirm>0</ForceToConfirm> <TrigCount>0</TrigCount> </value> </item> </RuleList> </RuleList>
-
保存,将文件扩展名改为.xml
-
导入贴吧管理器的违规规则(注意这会覆盖之前设置的规则)