此段帮助文件如何理解?

新手入门、经验交流

Moderator: cre

Forum rules
  • 软件自带帮助是最好的入门教程,请仔细阅读;在您掌握最基本知识前,我们没法帮助您
  • 提问前请先查阅软件帮助文件和论坛相关讨论
  • 查阅软件帮助和论坛相关讨论即可解决的问题帖将直接删除,以免浪费他人时间
  • 请学会如何提问,尽量将问题描述清楚,不明确的提问将被直接删除
Post Reply
ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

此段帮助文件如何理解?

Post by ddbb »

其实我本身英文也是很烂的
但是为了能自己好好的配pro 不得不好好的读一遍帮助文件
我就想反正也是要读一遍的 对我来说实际上就是一个单词一个单词的翻译过来几乎......
那还不如直接就做个中文版出来 就当是顺手了 也算是帮下别人了........

言归正传....
我在BlockList里遇到了一段 怎么看也看不明白 麻烦帮忙小小的解释一下好么

原文是

Also, as you've probably guessed from the examples, Lists can contain comments by beginning a line with '#'. Comments normally will be ignored, but the first few lines of a list are scanned for certain "keywords" which can affect how the list works. Currently there are six keywords: "NoAddURL", "junkbuster", "NoHash", "NoUrlHash", "NoPreHash", and "Logfile".

"NoAddURL" hides the list from the "Add to blockfile" menu in the sysytem tray. It's useful to keep it from becoming cluttered by lists not used for URL matches.

"JunkBuster" if found, will cause Proxomitron to attempt to read and interpret the list as a JunkBuster style blockfile. It's probably less than perfect, but seems to work fairly well with most JunkBuster lists.

Note that due to differences in methodology, designing your own list by adding URLs as you find them will likely be more efficient. In particular, JunkBuster processes hostnames in reverse (root first). Proxomitron treats a URL the same as any random text, so you're better off not using an initial wildcard. For instance, "(http://www.|)somehost.com" will be much faster than "*somehost.com". If you need a leading wildcard try "[^/]++somehost.com". It's a little better than '*' since it only scans up to the first "/" in the URL.

"NoHash", "NoUrlHash", and "NoPreHash" are used to disable various hashing algorithms used in lists. NoHash eliminates all hashing and can save memory for list that are seldom called or where speed isn't an issue. "NoUrlHash" and "NoPreHash" disable particular hash types (see section on hashing below). You probably shouldn't need to use these very often (if at all).

"Logfile" is a special command that tells Proxomitron not to load or process the contents of the file like a regular blocklist. Instead it's useful for using a blocklist for logging purposes along with the $ADDLST() command.

Normally Proxomitron loads and parses the contents of a blockfile into memory as matching expressions. However, for a logfile, not only would that be a waste of memory, but it might also produce parsing errors since the file's contents may not be matching expressions at all.

To set up a logfile, just create a file, add "LOGFILE" somewhere within the first few lines like so...


目前为止我翻译的进度是

关于简介(注释)

可能大家也注意到了,上面的例子中,包含了以 '#' 开头的简介。简介通常会被忽略,但是Proxomitron会检查最初的几行,来决定里面是否有他默认的 "关键字",这有可能会影响到列表的工作。目前的"关键字"有六个: "NoAddURL", "junkbuster", "NoHash", "NoUrlHash", "NoPreHash", 和 "Logfile"。

"NoAddURL" 列表在托盘图标上右键菜单的 "Add to blockfile" 子菜单里。. It's useful to keep it from becoming cluttered by lists not used for URL matches.

"JunkBuster" 被标示上之后,Proxomitron会把这段匹配规则理解成被JunkBuster style(废弃的风格)列表。 It's probably less than perfect, but seems to work fairly well with most JunkBuster lists.

Note that due to differences in methodology, designing your own list by adding URLs as you find them will likely be more efficient. In particular, JunkBuster processes hostnames in reverse (root first). Proxomitron treats a URL the same as any random text, so you're better off not using an initial wildcard. For instance, "(http://www.|)somehost.com" will be much faster than "*somehost.com". If you need a leading wildcard try "[^/]++somehost.com". It's a little better than '*' since it only scans up to the first "/" in the URL.

"NoHash", "NoUrlHash", and "NoPreHash" are used to disable various hashing algorithms used in lists. NoHash eliminates all hashing and can save memory for list that are seldom called or where speed isn't an issue. "NoUrlHash" and "NoPreHash" disable particular hash types (see section on hashing below). You probably shouldn't need to use these very often (if at all).

"Logfile" is a special command that tells Proxomitron not to load or process the contents of the file like a regular blocklist. Instead it's useful for using a blocklist for logging purposes along with the $ADDLST() command.

Normally Proxomitron loads and parses the contents of a blockfile into memory as matching expressions. However, for a logfile, not only would that be a waste of memory, but it might also produce parsing errors since the file's contents may not be matching expressions at all.

To set up a logfile, just create a file, add "LOGFILE" somewhere within the first few lines like so...

..............
很少是吧......我在这困扰了一个星期了 怎么查也查不明白该怎么理解这些话............
User avatar
phoenix
Site Admin
Posts: 526
Joined: Dec 29 2007, 16:27

Re: 此段帮助文件如何理解?

Post by phoenix »

我来简单解释一下:

NoAddURL
该List文件将不出现在Proxomitron系统托盘图标右键菜单的“Add to blockfile”下。

JunkBuster
说明该List文件是Junkbuster格式。Junkbuster是一个很老的广告过滤软件,已经过时很久了,忽略吧。

NoHash, NoUrlHash, and NoPreHash
禁止hash处理。
Proxomitron默认会对List文件的项目进行Hash处理并储存在内存中,可以极大提高关键字的查询速度。本论坛有一个相关讨论

Logfile
说明此文件是做log用的,和一般List文件格式不同,可以用$ADDLST()命令添加记录,比如此帖

我个人经验,只读一遍是很难完全理解所有内容的。Proxomitron的帮助文件,有些部分我看了很多遍,仍不敢说完全搞懂了。

当遇到不懂的内容,不要就此打住,而是继续看下去,很多时候后面的内容会帮你理解前面的内容。当你通读至少一遍后,有了总体的把握后,就可以开始自己编写规则或分析别人的规则,这时候肯定又会发现很多理解不清的地方,反过来再去阅读相应的帮助文件,会帮助你加深理解。以我上面提到的关于hash的讨论为例,我就是在发现问题后,又反复看了几遍才算更理解一些。

反复阅读,温故知新,这是学习知识的通用方法吧。
Post Reply