diff --git a/.gitattributes b/.gitattributes index 2f0e2bd..50f39b7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,7 @@ *.zip binary *.dmg binary *.tar.gz binary +*.png binary +*.ico binary +*.icns binary +*.qm binary diff --git a/.gitignore b/.gitignore index 1944fd6..6747499 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ *.tmp +*.pyc +*.data +Thumbs.db +hosts +.DS_Store diff --git a/README b/README.md similarity index 100% rename from README rename to README.md diff --git a/_build.py b/_build.py index 3e99b6f..2a043a3 100644 --- a/_build.py +++ b/_build.py @@ -70,7 +70,8 @@ ] ), "LICENSE", - "README", + "README.md", + "network.conf", ] if sys.argv > 1: @@ -78,8 +79,9 @@ if sys.argv[1] == "py2tar": # Pack up script package for Linux users file_path = lambda rel_path: SCRIPT_DIR + rel_path - includes = ["*.py", "lang/*.qm", "LICENSE", "README"] - excludes = ["_*.py", ".gitattributes", "README.md"] + includes = [ + "*.py", "lang/*.qm", "LICENSE", "README.md", "network.conf"] + excludes = ["_*.py", ".gitattributes"] ex_files = [] prefix = "HostsUtl-x11-gpl-" tar_flag = 1 @@ -88,7 +90,7 @@ # Pack up source package for Linux users file_path = lambda rel_path: SCRIPT_DIR + rel_path includes = ["*"] - excludes = [".gitattributes", "README.md"] + excludes = [".gitattributes"] ex_files = [] prefix = "HostsUtl-source-gpl-" tar_flag = 1 diff --git a/hostsutl.py b/hostsutl.py index 5c5da79..f9d420a 100644 --- a/hostsutl.py +++ b/hostsutl.py @@ -14,7 +14,7 @@ # PURPOSE. # ===================================================================== -__version__ = "1.9.5" +__version__ = "1.9.6" __revision__ = "$Id$" __author__ = "huhamhire " @@ -66,6 +66,11 @@ class MainDialog(QtGui.QDialog): function list for IPv4 and IPv6 environment. _make_cfg (dict): A dictionary containing the selection control bytes to make a hosts file. + _make_mode (str): A string indicating the operation mode for making + hosts file. + _make_path (str): A string indicating the path to store the hosts file + in export mode. + _sys_eol (str): A string indicating the End-Of-Line marker. _update (dict): A dictionary containing the update information of the current data file on server. _trans (obj): A QtCore.QTranslator object indicating the current UI @@ -103,6 +108,9 @@ class MainDialog(QtGui.QDialog): _down_flag = 0 _funcs = [[], []] _make_cfg = {} + _make_mode = "" + _make_path = "./hosts" + _sys_eol = "" _update = {} _trans = None @@ -118,17 +126,7 @@ class MainDialog(QtGui.QDialog): hostspath = '' # Mirror related configuration _mirr_id = 0 - mirrors = [ - {"tag": "Google Code", "test_url": "huhamhire-hosts.googlecode.com", - "update": ("http://huhamhire-hosts.googlecode.com/git-history/" - "gh-pages/update/")}, - {"tag": "Sourceforge" , "test_url": "master.dl.sourceforge.net", - "update": ("http://master.dl.sourceforge.net/project/" - "huhamhirehosts/update/")}, - {"tag": "Github", "test_url": "github.com", - "update": "http://huhamhire.github.com/huhamhire-hosts/update/"}, - {"tag": "Atlanta", "test_url": "hosts.huhamhire.com", - "update": "http://hosts.huhamhire.com/update/"}, ] + mirrors = [] # Name of items from the function list to be localized __list_trans = [ _translate("HostsUtlMain", "google(cn)", None), @@ -227,7 +225,7 @@ def on_Lang_changed(self, lang): new_lang = LangUtilities.get_locale_by_language(unicode(lang)) trans = QtCore.QTranslator() global LANG_DIR - trans.load(''.join([LANG_DIR, new_lang])) + trans.load(LANG_DIR + new_lang) QtGui.QApplication.removeTranslator(self._trans) QtGui.QApplication.installTranslator(trans) self._trans = trans @@ -248,13 +246,33 @@ def on_MakeHosts_clicked(self): self.warning_permission() return if self.question_apply(): - self.set_makemsg(unicode(_translate( - "HostsUtlMain", "Building hosts file...", None)), 1) - self.set_cfgbytes() - self.make_hosts() + self._make_path = "./hosts" + self.make_hosts("system") else: return + def on_MakeANSI_clicked(self): + """Export hosts ANSI - Public Method + + The slot response to the signal from ButtonANSI widget while the + button is clicked. This method would call operations to export a hosts + file encoding in ANSI. + """ + self._make_path = self.export_hosts() + if unicode(self._make_path) != u'': + self.make_hosts("ansi") + + def on_MakeUTF8_clicked(self): + """Export hosts in UTF-8 - Public Method + + The slot response to the signal from ButtonUTF widget while the + button is clicked. This method would call operations to export a hosts + file encoding in UTF-8. + """ + self._make_path = self.export_hosts() + if unicode(self._make_path) != u'': + self.make_hosts("utf-8") + def on_Backup_clicked(self): """Backup system hosts file - Public Method @@ -264,9 +282,9 @@ def on_Backup_clicked(self): """ l_time = time.localtime(time.time()) backtime = time.strftime("%Y-%m-%d-%H%M%S", l_time) - filename = ''.join(["hosts_", backtime, ".bak"]) + filename = "hosts_" + backtime + ".bak" if self.platform == "OS X": - filename = ''.join(["/Users/", filename]) + filename = "/Users/" + filename filepath = QtGui.QFileDialog.getSaveFileName( self, _translate("HostsUtlMain", "Backup hosts", None), QtCore.QString(filename), @@ -289,7 +307,7 @@ def on_Restore_clicked(self): return filename = '' if self.platform == "OS X": - filename = ''.join(["/Users/", filename]) + filename = "/Users/" + filename filepath = QtGui.QFileDialog.getOpenFileName( self, _translate("HostsUtlMain", "Restore hosts", None), QtCore.QString(filename), @@ -308,6 +326,8 @@ def on_CheckUpdate_clicked(self): if self.choice != [[], []]: self.refresh_func_list() self.Ui.ButtonApply.setEnabled(True) + self.Ui.ButtonANSI.setEnabled(True) + self.Ui.ButtonUTF.setEnabled(True) if self._update == {} or self._update["version"] == \ unicode(_translate("HostsUtlMain", "[Error]", None)): self.check_update() @@ -325,6 +345,8 @@ def on_FetchUpdate_clicked(self): self._down_flag = 1 self.Ui.Functionlist.setEnabled(False) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) if self._update == {} or self._update["version"] == \ unicode(_translate("HostsUtlMain", "[Error]", None)): self.check_update() @@ -341,6 +363,8 @@ def init_main(self): current operating system and current session. """ self.Ui.SelectMirror.clear() + # Set mirrors + self.mirrors = Utilities.set_network("network.conf") for i, mirror in enumerate(self.mirrors): self.Ui.SelectMirror.addItem(_fromUtf8("")) self.Ui.SelectMirror.setItemText( @@ -426,6 +450,8 @@ def fetch_update(self): self.Ui.ButtonCheck.setEnabled(False) self.Ui.ButtonUpdate.setEnabled(False) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) self.Ui.ButtonExit.setEnabled(False) thread = QSubFetchUpdate(self) thread.prog_trigger.connect(self.set_downprogbar) @@ -447,19 +473,47 @@ def fetch_update_aftercheck(self): self.info_uptodate() self.finish_fetch() - def make_hosts(self): + def export_hosts(self): + """Draw export hosts dialog - Public Method + + Show the export dialog and get the path to save the exported hosts + file. + + Returns: + A string indicating the path to export a hosts file + """ + filename = "hosts" + if self.platform == "OS X": + filename = "/Users/" + filename + filepath = QtGui.QFileDialog.getSaveFileName( + self, _translate("HostsUtlMain", "Export hosts", None), + QtCore.QString(filename), + _translate("HostsUtlMain", "hosts File", None)) + return filepath + + def make_hosts(self, mode="system"): """Operations to make hosts file - Public Method Call operations to make a new hosts file for current system. + + Args: + mode (str): A string indicating the operation mode for making + hosts file. """ self.Ui.Functionlist.setEnabled(False) self.Ui.SelectIP.setEnabled(False) self.Ui.ButtonCheck.setEnabled(False) self.Ui.ButtonUpdate.setEnabled(False) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) self.Ui.ButtonExit.setEnabled(False) + self.set_makemsg(unicode(_translate( + "HostsUtlMain", "Building hosts file...", None)), 1) # Avoid conflict while making hosts file RetrieveData.disconnect_db() + self._make_mode = mode + self.set_cfgbytes(mode) thread = QSubMakeHosts(self) thread.info_trigger.connect(self.set_makeprog) thread.fina_trigger.connect(self.set_makefina) @@ -496,7 +550,7 @@ def set_languages(self): langs = LangUtilities.language langs_not_found = [] for locale in langs: - if not os.path.isfile(''.join([LANG_DIR, locale, ".qm"])): + if not os.path.isfile(LANG_DIR + locale + ".qm"): langs_not_found.append(locale) for locale in langs_not_found: langs.pop(locale) @@ -529,6 +583,10 @@ def set_platform(self): self.platform = system self.hostname = hostname self.hostspath = path + if encode == "win_ansi": + self._sys_eol = "\r\n" + else: + self._sys_eol = "\n" def set_font(self): """Set font and window style - Public Method @@ -725,17 +783,24 @@ def set_listitemunchecked(self, item_id): item = self.Ui.Functionlist.item(item_id) item.setCheckState(QtCore.Qt.Unchecked) - def set_cfgbytes(self): + def set_cfgbytes(self, mode): """Set configuration byte words - Public Method Calculate the module configuration byte words by the selection from function list on the main dialog. + + Args: + mode (str): A string indicating the operation mode for making + hosts file. """ ip_flag = self._ipv_id selection = {} - localhost_word = { - "Windows": 0x0001, "Linux": 0x0002, - "Unix": 0x0002, "OS X": 0x0004}[self.platform] + if mode == "system": + localhost_word = { + "Windows": 0x0001, "Linux": 0x0002, + "Unix": 0x0002, "OS X": 0x0004}[self.platform] + else: + localhost_word = 0x0008 selection[0x02] = localhost_word ch_parts = (0x08, 0x20 if self._ipv_id else 0x10, 0x40) slices = self.slices[ip_flag] @@ -810,7 +875,7 @@ def set_makemsg(self, msg, start=0): "HostsUtlMain", "Progress", None)) self.Ui.Functionlist.clear() item = QtGui.QListWidgetItem() - item.setText(''.join(["- " , msg])) + item.setText("- " + msg) item.setFlags(QtCore.Qt.ItemIsEnabled) self.Ui.Functionlist.addItem(item) @@ -832,6 +897,8 @@ def set_makefina(self, time, count): self.Ui.ButtonCheck.setEnabled(True) self.Ui.ButtonUpdate.setEnabled(True) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) self.Ui.ButtonExit.setEnabled(True) RetrieveData.connect_db() msg = unicode(_translate("HostsUtlMain", @@ -898,6 +965,8 @@ def finish_fetch(self, refresh=1, error=0): "fetch a new data file.", None)) self.set_message(msg_title, msg) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) self.set_conn_status(0) else: # Data file retrieved successfully @@ -906,6 +975,8 @@ def finish_fetch(self, refresh=1, error=0): "Download Complete", None))) self.refresh_info(refresh) self.Ui.ButtonApply.setEnabled(True) + self.Ui.ButtonANSI.setEnabled(True) + self.Ui.ButtonUTF.setEnabled(True) self.Ui.Functionlist.setEnabled(True) self.Ui.SelectMirror.setEnabled(True) self.Ui.ButtonCheck.setEnabled(True) @@ -969,6 +1040,8 @@ def warning_incorrect_datafile(self): "fetch a new data file.", None)) self.set_message(msg_title, msg) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) def warning_no_datafile(self): """Show no data file warning - Public Method @@ -982,6 +1055,8 @@ def warning_no_datafile(self): "fetch a new data file.", None)) self.set_message(msg_title, msg) self.Ui.ButtonApply.setEnabled(False) + self.Ui.ButtonANSI.setEnabled(False) + self.Ui.ButtonUTF.setEnabled(False) def question_apply(self): """Show confirm make question - Public Method @@ -1106,11 +1181,9 @@ def __init__(self, parent=None): from. """ super(QSubFetchUpdate, self).__init__(parent) - self.url = ''.join([ - parent.mirrors[parent._mirr_id]["update"], - parent.filename]) - self.path = ''.join(["./", parent.filename]) - self.tmp_path = ''.join([self.path, ".download"]) + self.url = parent.mirrors[parent._mirr_id]["update"] + parent.filename + self.path = "./" + parent.filename + self.tmp_path = self.path + ".download" self.filesize = parent._update["size"] def run(self): @@ -1205,12 +1278,21 @@ class QSubMakeHosts(QtCore.QThread): currently. mod_num (int): An integer indicating total number of modules being operated while making hosts file. + make_cfg (dict): A dictionary containing the selection control bytes + to make a hosts file. + make_mode (str): A string indicating the operation mode for making + hosts file. + eol (str): A string indicating the End-Of-Line marker. """ info_trigger = QtCore.pyqtSignal(str, int) fina_trigger = QtCore.pyqtSignal(str, int) move_trigger = QtCore.pyqtSignal() + count = 0 mod_num = 0 + make_cfg = {} + make_mode = "" + eol = "" def __init__(self, parent=None): """Initialize a new instance of this class - Private Method @@ -1224,8 +1306,18 @@ def __init__(self, parent=None): super(QSubMakeHosts, self).__init__(parent) self.count = 0 self.make_cfg = parent._make_cfg + self.make_mode = parent._make_mode + make_path = parent._make_path self.hostname = parent.hostname - self.hosts_file = open("hosts", "w") + if parent._make_mode == "system": + self.eol = parent._sys_eol + self.hosts_file = open("hosts", "wb") + elif parent._make_mode == "ansi": + self.eol = "\r\n" + self.hosts_file = open(unicode(make_path), "wb") + elif parent._make_mode == "utf-8": + self.eol = "\n" + self.hosts_file = open(unicode(make_path), "wb") def run(self): """Make new hosts file - Public Method @@ -1243,7 +1335,8 @@ def run(self): end_time = time.time() total_time = "%.4f" % (end_time - start_time) self.fina_trigger.emit(total_time, self.count) - self.move_trigger.emit() + if self.make_mode == "system": + self.move_trigger.emit() RetrieveData.disconnect_db() def get_hosts(self, make_cfg): @@ -1274,7 +1367,7 @@ def write_head(self): Write the head part of new hosts file. """ for head_str in RetrieveData.get_head(): - self.hosts_file.write("%s\n" % head_str[0]) + self.hosts_file.write("%s%s" % (head_str[0], self.eol)) def write_info(self): """Write info section - Public Method @@ -1288,7 +1381,7 @@ def write_info(self): info_lines.append("# %s: %s" % ("Applytime", int(self.maketime))) info_lines.append("#") for line in info_lines: - self.hosts_file.write("%s\n" % line) + self.hosts_file.write("%s%s" % (line, self.eol)) def write_common_mod(self, part_id, mod_id): """Write module section - Public Method @@ -1304,11 +1397,12 @@ def write_common_mod(self, part_id, mod_id): """ hosts, mod_name = RetrieveData.get_host(part_id, mod_id) self.info_trigger.emit(mod_name, self.mod_num) - self.hosts_file.write("\n# Section Start: %s\n" % mod_name) + self.hosts_file.write( + "%s# Section Start: %s%s" % (self.eol, mod_name, self.eol)) for host in hosts: - self.hosts_file.write("%s %s\n" % (host[0], host[1])) + self.hosts_file.write("%s %s%s" % (host[0], host[1], self.eol)) self.count += 1 - self.hosts_file.write("# Section End: %s\n" % mod_name) + self.hosts_file.write("# Section End: %s%s" % (mod_name, self.eol)) def write_localhost_mod(self, part_id, mod_id): """Write localhost section - Public Method @@ -1324,13 +1418,14 @@ def write_localhost_mod(self, part_id, mod_id): """ hosts, mod_name = RetrieveData.get_host(part_id, mod_id) self.info_trigger.emit(mod_name, self.mod_num) - self.hosts_file.write("\n# Section Start: Localhost\n") + self.hosts_file.write( + "%s# Section Start: Localhost%s" % (self.eol, self.eol)) for host in hosts: if "#Replace" in host[1]: host = (host[0], self.hostname) - self.hosts_file.write("%s %s\n" % (host[0], host[1])) + self.hosts_file.write("%s %s%s" % (host[0], host[1], self.eol)) self.count += 1 - self.hosts_file.write("# Section End: Localhost\n") + self.hosts_file.write("# Section End: Localhost%s" % (self.eol)) class QSubChkUpdate(QtCore.QThread): @@ -1361,9 +1456,7 @@ def __init__(self, parent=None): from. """ super(QSubChkUpdate, self).__init__(parent) - self.url = ''.join([ - parent.mirrors[parent._mirr_id]["update"], - parent.infofile]) + self.url = parent.mirrors[parent._mirr_id]["update"] + parent.infofile def run(self): """Check update - Public Method diff --git a/img/icon_ansi.png b/img/icon_ansi.png new file mode 100644 index 0000000..97c9949 Binary files /dev/null and b/img/icon_ansi.png differ diff --git a/img/icon_apply.png b/img/icon_apply.png index 21ca89c..61b78e4 100644 Binary files a/img/icon_apply.png and b/img/icon_apply.png differ diff --git a/img/icon_backup.png b/img/icon_backup.png index 8d659ed..ec08348 100644 Binary files a/img/icon_backup.png and b/img/icon_backup.png differ diff --git a/img/icon_exit.png b/img/icon_exit.png index 1e7ca8a..86bfe68 100644 Binary files a/img/icon_exit.png and b/img/icon_exit.png differ diff --git a/img/icon_fetch.png b/img/icon_fetch.png index d3dbfee..4a64e6e 100644 Binary files a/img/icon_fetch.png and b/img/icon_fetch.png differ diff --git a/img/icon_restore.png b/img/icon_restore.png index dfaec84..8d50943 100644 Binary files a/img/icon_restore.png and b/img/icon_restore.png differ diff --git a/img/icon_update.png b/img/icon_update.png index eb3fd5e..24df0d9 100644 Binary files a/img/icon_update.png and b/img/icon_update.png differ diff --git a/img/icon_utf.png b/img/icon_utf.png new file mode 100644 index 0000000..5e89802 Binary files /dev/null and b/img/icon_utf.png differ diff --git a/img/utl_icon.png b/img/utl_icon.png index 007d610..e6db3d8 100644 Binary files a/img/utl_icon.png and b/img/utl_icon.png differ diff --git a/img/utl_icon_256x256.png b/img/utl_icon_256x256.png index 9038ffa..68d6d0e 100644 Binary files a/img/utl_icon_256x256.png and b/img/utl_icon_256x256.png differ diff --git a/lang/en_US.qm b/lang/en_US.qm index ed9fca8..32acf2b 100644 Binary files a/lang/en_US.qm and b/lang/en_US.qm differ diff --git a/lang/en_US.ts b/lang/en_US.ts index 4236130..d54fa84 100644 --- a/lang/en_US.ts +++ b/lang/en_US.ts @@ -4,266 +4,266 @@ HostsUtlMain - + Backup hosts - + Functions - + Hosts Setup Utility - + Config - + Server - + IP Version - + Status - + Connection - + N/A - + OS - + Backup the hosts file of current system. - + Download data file - + Download the latest data file. - + Restore backup - + Restore a previous backup of hosts file. - + Apply hosts - + Apply changes to the hosts file. - + Exit - + Close this tool. - + Check update / Refresh - + Check the latest version of hosts data file. - + Hosts Info - + Version - + Release - + Latest - + google(cn) - + google(us) - + activation-helper - + others - + adblock-hostsx - + adblock-mvps - + adblock-mwsl - + adblock-yoyo - + Building hosts file... - + Backup File(*.bak) - + Restore hosts - + [Error] - + Checking... - + Copying new hosts file to %s - + Remove temporary file - + Operation completed - + [OK] - + [Failed] - + Applying module: %s(%s/%s) - + Progress - + Notice: %i hosts entries has been applied in %ssecs. - + Operation Completed Successfully! - + Error - + Incorrect Data file! Please use the "Download" key to fetch a new data file. - + Download Complete - + Warning - + You do not have permissions to change the hosts file. Please run this program as Administrator/root @@ -271,45 +271,45 @@ so it can modify your hosts file. - + Error retrieving data from the server. Please try another server. - + Data file not found! Please use the "Download" key to fetch a new data file. - + Notice - + Data file is up-to-date. - + Complete - + Connecting... - + Downloading: %s / %s - + Are you sure you want to apply changes to the hosts file on your system? @@ -318,5 +318,35 @@ you have not made a backup of your current hosts file. + + + Save with ANSI + + + + + Export to hosts file encoding by ANSI. + + + + + Save with UTF-8 + + + + + Export to hosts file encoding by UTF-8. + + + + + Export hosts + + + + + hosts File + + diff --git a/lang/zh_CN.qm b/lang/zh_CN.qm index 8e680d5..a5b24c7 100644 Binary files a/lang/zh_CN.qm and b/lang/zh_CN.qm differ diff --git a/lang/zh_CN.ts b/lang/zh_CN.ts index d98a1fb..3146fcd 100644 --- a/lang/zh_CN.ts +++ b/lang/zh_CN.ts @@ -4,172 +4,172 @@ HostsUtlMain - + Backup hosts 备份 hosts 文件 - + Backup File(*.bak) 备份文件(*.bak) - + Restore hosts 还原备份的 hosts 文件 - + Functions 功能列表 - + Progress 操作进度 - + Warning 警告 - + Notice 注意 - + Data file is up-to-date. 数据文件已经是最新版本。 - + Complete 完成 - + Operation completed 操作完成 - + Hosts Setup Utility hosts 文件配置工具 - + Config 设置 - + Server 服务器 - + IP Version IP 协议版本 - + Status 状态 - + Connection 连接 - + N/A - + OS 操作系统 - + Backup the hosts file of current system. 备份当前系统的 hosts 文件。 - + Download data file 下载数据文件 - + Download the latest data file. 下载最新数据文件。 - + Restore backup 还原备份 - + Restore a previous backup of hosts file. 还原先前备份的 hosts 文件。 - + Apply hosts 更改 hosts - + Apply changes to the hosts file. 对 hosts 文件进行修改。 - + Exit 退出 - + Close this tool. 关闭本工具。 - + Check the latest version of hosts data file. 在线检查数据文件的最新版本。 - + Hosts Info 数据文件信息 - + Version 当前版本 - + Release 发布日期 - + Latest 最新版本 - + Check update / Refresh 检查更新/刷新 - + Data file not found! Please use the "Download" key to fetch a new data file. @@ -178,7 +178,7 @@ fetch a new data file. 新的数据文件。 - + You do not have permissions to change the hosts file. Please run this program as Administrator/root @@ -189,76 +189,76 @@ so it can modify your hosts file. 工具。 - + Error retrieving data from the server. Please try another server. 在从服务器获取数据是发生错误。 请在更换服务器之后尝试之前的操作。 - + Operation Completed Successfully! 操作成功完成! - + Error 错误 - + Download Complete 下载完成 - + [Error] [错误] - + Checking... 正在连接... - + [OK] [正常] - + [Failed] [失败] - + Building hosts file... 正在生成 hosts 文件... - + Applying module: %s(%s/%s) 应用选定的模块: %s(%s/%s) - + Notice: %i hosts entries has been applied in %ssecs. 注意:共有 %i 条 hosts 条目在 %s秒内被插入到 hosts 文件中。 - + Downloading: %s / %s 正在下载: %s / %s - + Connecting... 正在连接服务器... - + Incorrect Data file! Please use the "Download" key to fetch a new data file. @@ -267,59 +267,59 @@ fetch a new data file. 新的数据文件。 - + Copying new hosts file to %s 正在将新的 hosts 配置到目标路径 %s - + Remove temporary file 清理临时文件 - + google(cn) Google 国内服务器 - + google(us) Google 美国服务器 - + activation-helper 屏蔽部分破解软件激活服务器 - + others 其他墙外站点 - + adblock-hostsx 广告屏蔽-hostsx 列表 - + adblock-mvps 广告屏蔽-mvps 列表 - + adblock-mwsl 广告屏蔽-mwsl 列表 - + adblock-yoyo 广告屏蔽-yoyo 列表 - + Are you sure you want to apply changes to the hosts file on your system? @@ -332,5 +332,35 @@ current hosts file. 若先前未对 hosts 文件进行备份,该操作将 不可逆转。 + + + Save with ANSI + 保存为 ANSI 格式 + + + + Export to hosts file encoding by ANSI. + 以 ANSI 的编码方式导出 hosts 文件。 + + + + Save with UTF-8 + 保存为 UTF-8 格式 + + + + Export to hosts file encoding by UTF-8. + 以 UTF-8 的编码方式导出 hosts 文件。 + + + + Export hosts + 导出 hosts 文件 + + + + hosts File + hosts 文件 + diff --git a/lang/zh_TW.qm b/lang/zh_TW.qm index ba79603..539f18d 100644 Binary files a/lang/zh_TW.qm and b/lang/zh_TW.qm differ diff --git a/lang/zh_TW.ts b/lang/zh_TW.ts index b999686..be001c2 100644 --- a/lang/zh_TW.ts +++ b/lang/zh_TW.ts @@ -4,136 +4,136 @@ HostsUtlMain - + google(cn) Google 大陸 - + google(us) Google 美國 - + activation-helper 遮罩部分破解軟體啟動伺服器 - + others 其他網站 - + adblock-hostsx 廣告攔截-hostsx 清單 - + adblock-mvps 廣告攔截-mvps 清單 - + adblock-mwsl 廣告攔截-mwsl 清單 - + adblock-yoyo 廣告攔截-yoyo 清單 - + Building hosts file... 正在創建 hosts 檔... - + Backup hosts 備份 hosts 檔 - + Backup File(*.bak) 備份檔(*.bak) - + Restore hosts 還原 hosts - + [Error] [錯誤] - + Checking... 正在連接伺服器... - + Copying new hosts file to %s 將新的 hosts 檔案複製到 %s - + Remove temporary file 刪除暫存檔案 - + Operation completed 作業完成 - + [OK] [好] - + [Failed] [失敗] - + Functions 功能清單 - + Applying module: %s(%s/%s) 應用選定的模組: %s(%s/%s) - + Progress 作業進度 - + Notice: %i hosts entries has been applied in %ssecs. 消息:共有 %i 条 hosts 条目在 %s秒内被插入到 hosts 文件中。 - + Operation Completed Successfully! 作業已成功完成 ! - + Error 錯誤 - + Incorrect Data file! Please use the "Download" key to fetch a new data file. @@ -142,17 +142,17 @@ fetch a new data file. 一個新的資料檔案。 - + Download Complete 下載已完成 - + Warning 警告 - + You do not have permissions to change the hosts file. Please run this program as Administrator/root @@ -162,14 +162,14 @@ so it can modify your hosts file. 程式。 - + Error retrieving data from the server. Please try another server. 從伺服器中檢索資料時出錯。 請嘗試使用另一台伺服器。 - + Data file not found! Please use the "Download" key to fetch a new data file. @@ -178,147 +178,147 @@ fetch a new data file. 一個新的資料檔案。 - + Notice 消息 - + Data file is up-to-date. 當前的資料檔案是最新的。 - + Complete 完成 - + Connecting... 正在連接... - + Downloading: %s / %s 正在下載: %s / %s - + Hosts Setup Utility hosts 設置實用程式 - + Config 配置 - + Server 伺服器 - + IP Version IP 協定版本 - + Status 狀態 - + Connection 連接狀態 - + N/A 不適用 - + OS 作業系統 - + Backup the hosts file of current system. 備份當前系統的 hosts 檔。 - + Download data file 下載資料檔案 - + Download the latest data file. 下載最新的資料檔案。 - + Restore backup 還原備份 - + Restore a previous backup of hosts file. 還原以前的備份的 hosts 檔。 - + Apply hosts 更改 hosts 檔 - + Apply changes to the hosts file. 將更改應用到主 hosts 檔。 - + Exit 退出 - + Close this tool. 關閉此程式。 - + Check update / Refresh 檢查更新 / 刷新 - + Check the latest version of hosts data file. 檢查 hosts 檔案的最新版本。 - + Hosts Info 資料檔案狀態 - + Version 當前版本 - + Release 發佈日期 - + Latest 最新版本 - + Are you sure you want to apply changes to the hosts file on your system? @@ -331,5 +331,35 @@ current hosts file. 若先前未對 hosts 檔進行備份,該操作將 不可逆轉。 + + + Save with ANSI + 保存為 ANSI 格式 + + + + Export to hosts file encoding by ANSI. + 匯出由 ANSI 編碼的 hosts 檔。 + + + + Save with UTF-8 + 保存為 UTF-8 格式 + + + + Export to hosts file encoding by UTF-8. + 匯出由 UTF-8 編碼的 hosts 檔。 + + + + Export hosts + 匯出 hosts 檔 + + + + hosts File + hosts 檔 + diff --git a/mac_res/dmg_resource/background.png b/mac_res/dmg_resource/background.png index 5b3f4a7..cbce0d0 100644 Binary files a/mac_res/dmg_resource/background.png and b/mac_res/dmg_resource/background.png differ diff --git a/network.conf b/network.conf new file mode 100644 index 0000000..5e96e43 --- /dev/null +++ b/network.conf @@ -0,0 +1,15 @@ +[Google Code] +server = huhamhire-hosts.googlecode.com +update = http://huhamhire-hosts.googlecode.com/git-history/gh-pages/update/ + +[Sourceforge] +server = master.dl.sourceforge.net +update = http://master.dl.sourceforge.net/project/huhamhirehosts/update/ + +[Github] +server = github.com +update = http://huhamhire.github.com/huhamhire-hosts/update/ + +[Seattle] +server = hosts.huhamhire.com +update = http://hosts.huhamhire.com/update/ diff --git a/qthosts.qrc b/qthosts.qrc index 69ed966..dd6f00e 100644 --- a/qthosts.qrc +++ b/qthosts.qrc @@ -1,5 +1,7 @@ + img/icon_utf.png + img/icon_ansi.png img/icon_apply.png img/icon_backup.png img/icon_exit.png diff --git a/qthosts_rc.py b/qthosts_rc.py index 8a2efa3..c045b03 100644 --- a/qthosts_rc.py +++ b/qthosts_rc.py @@ -2,7 +2,7 @@ # Resource object code # -# Created: 周一 7月 22 15:51:01 2013 +# Created: 周五 8月 2 19:08:24 2013 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! @@ -887,6 +887,392 @@ \x73\xa4\xe7\x43\xad\xc6\x16\xe8\xbb\x50\x28\x14\x3e\x02\xf0\xac\ \xe2\x3f\x01\x06\x00\x38\x2c\x0f\x54\xe7\x24\x21\xce\x00\x00\x00\ \x00\x49\x45\x4e\x44\xae\x42\x60\x82\ +\x00\x00\x0b\xfc\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ +\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ +\x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ +\x79\x71\xc9\x65\x3c\x00\x00\x03\x71\x69\x54\x58\x74\x58\x4d\x4c\ +\x3a\x63\x6f\x6d\x2e\x61\x64\x6f\x62\x65\x2e\x78\x6d\x70\x00\x00\ +\x00\x00\x00\x3c\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x62\x65\x67\ +\x69\x6e\x3d\x22\xef\xbb\xbf\x22\x20\x69\x64\x3d\x22\x57\x35\x4d\ +\x30\x4d\x70\x43\x65\x68\x69\x48\x7a\x72\x65\x53\x7a\x4e\x54\x63\ +\x7a\x6b\x63\x39\x64\x22\x3f\x3e\x20\x3c\x78\x3a\x78\x6d\x70\x6d\ +\x65\x74\x61\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x3d\x22\x61\x64\x6f\ +\x62\x65\x3a\x6e\x73\x3a\x6d\x65\x74\x61\x2f\x22\x20\x78\x3a\x78\ +\x6d\x70\x74\x6b\x3d\x22\x41\x64\x6f\x62\x65\x20\x58\x4d\x50\x20\ +\x43\x6f\x72\x65\x20\x35\x2e\x35\x2d\x63\x30\x31\x34\x20\x37\x39\ +\x2e\x31\x35\x31\x34\x38\x31\x2c\x20\x32\x30\x31\x33\x2f\x30\x33\ +\x2f\x31\x33\x2d\x31\x32\x3a\x30\x39\x3a\x31\x35\x20\x20\x20\x20\ +\x20\x20\x20\x20\x22\x3e\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x20\ +\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\x68\x74\x74\x70\x3a\ +\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\ +\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\x2d\x73\x79\x6e\x74\ +\x61\x78\x2d\x6e\x73\x23\x22\x3e\x20\x3c\x72\x64\x66\x3a\x44\x65\ +\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x20\x72\x64\x66\x3a\x61\x62\ +\x6f\x75\x74\x3d\x22\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6d\x70\ +\x4d\x4d\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\ +\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\ +\x6d\x6d\x2f\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x73\x74\x52\x65\x66\ +\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\ +\x65\x2e\x63\x6f\x6d\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\x73\x54\ +\x79\x70\x65\x2f\x52\x65\x73\x6f\x75\x72\x63\x65\x52\x65\x66\x23\ +\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6d\x70\x3d\x22\x68\x74\x74\ +\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\ +\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\x22\x20\x78\x6d\x70\x4d\x4d\ +\x3a\x4f\x72\x69\x67\x69\x6e\x61\x6c\x44\x6f\x63\x75\x6d\x65\x6e\ +\x74\x49\x44\x3d\x22\x78\x6d\x70\x2e\x64\x69\x64\x3a\x62\x62\x65\ +\x34\x65\x39\x38\x62\x2d\x34\x38\x33\x63\x2d\x62\x63\x34\x33\x2d\ +\x62\x62\x33\x65\x2d\x62\x35\x35\x32\x61\x31\x32\x61\x31\x39\x34\ +\x34\x22\x20\x78\x6d\x70\x4d\x4d\x3a\x44\x6f\x63\x75\x6d\x65\x6e\ +\x74\x49\x44\x3d\x22\x78\x6d\x70\x2e\x64\x69\x64\x3a\x45\x46\x34\ +\x34\x46\x42\x41\x46\x46\x42\x33\x37\x31\x31\x45\x32\x39\x31\x41\ +\x33\x38\x44\x31\x43\x33\x43\x30\x31\x35\x39\x34\x44\x22\x20\x78\ +\x6d\x70\x4d\x4d\x3a\x49\x6e\x73\x74\x61\x6e\x63\x65\x49\x44\x3d\ +\x22\x78\x6d\x70\x2e\x69\x69\x64\x3a\x45\x46\x34\x34\x46\x42\x41\ +\x45\x46\x42\x33\x37\x31\x31\x45\x32\x39\x31\x41\x33\x38\x44\x31\ +\x43\x33\x43\x30\x31\x35\x39\x34\x44\x22\x20\x78\x6d\x70\x3a\x43\ +\x72\x65\x61\x74\x6f\x72\x54\x6f\x6f\x6c\x3d\x22\x41\x64\x6f\x62\ +\x65\x20\x50\x68\x6f\x74\x6f\x73\x68\x6f\x70\x20\x43\x43\x20\x28\ +\x57\x69\x6e\x64\x6f\x77\x73\x29\x22\x3e\x20\x3c\x78\x6d\x70\x4d\ +\x4d\x3a\x44\x65\x72\x69\x76\x65\x64\x46\x72\x6f\x6d\x20\x73\x74\ +\x52\x65\x66\x3a\x69\x6e\x73\x74\x61\x6e\x63\x65\x49\x44\x3d\x22\ +\x78\x6d\x70\x2e\x69\x69\x64\x3a\x30\x62\x33\x38\x38\x36\x38\x39\ +\x2d\x35\x62\x30\x34\x2d\x64\x66\x34\x35\x2d\x62\x34\x32\x38\x2d\ +\x32\x31\x33\x61\x62\x36\x62\x35\x38\x37\x38\x32\x22\x20\x73\x74\ +\x52\x65\x66\x3a\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x44\x3d\x22\ +\x78\x6d\x70\x2e\x64\x69\x64\x3a\x62\x62\x65\x34\x65\x39\x38\x62\ +\x2d\x34\x38\x33\x63\x2d\x62\x63\x34\x33\x2d\x62\x62\x33\x65\x2d\ +\x62\x35\x35\x32\x61\x31\x32\x61\x31\x39\x34\x34\x22\x2f\x3e\x20\ +\x3c\x2f\x72\x64\x66\x3a\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6f\ +\x6e\x3e\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\x46\x3e\x20\x3c\x2f\ +\x78\x3a\x78\x6d\x70\x6d\x65\x74\x61\x3e\x20\x3c\x3f\x78\x70\x61\ +\x63\x6b\x65\x74\x20\x65\x6e\x64\x3d\x22\x72\x22\x3f\x3e\xf5\x19\ +\xe3\x80\x00\x00\x08\x21\x49\x44\x41\x54\x78\xda\xac\x57\x69\x70\ +\x14\xc7\x15\x7e\x3b\x33\x3b\x7b\x0a\x21\x69\x25\x74\x9f\xe8\x42\ +\xe8\xb0\x0e\x30\x08\x61\x4c\x24\x40\x10\x14\x14\x08\xa0\x32\xb1\ +\x1d\xa7\x62\x3b\x55\x51\x7e\x38\xb6\x7f\x38\xe5\xaa\xfc\x48\x55\ +\x62\x92\xb2\x5d\x15\x70\xd9\x4e\x8a\x40\x19\x0c\x01\x83\x2d\xb0\ +\xac\x80\x31\x20\x11\x71\x58\x27\x42\x02\x5d\xe8\xbe\x0f\x74\xad\ +\x76\x57\xbb\xb3\xb3\xf9\x7a\x24\x11\x2c\x63\x49\xc4\xee\xaa\xae\ +\x9d\xee\x99\xee\xf7\xf5\xf7\xbe\xf7\x5e\xaf\xaa\xb3\xb3\x93\x4a\ +\x8a\x8b\x29\x38\x62\xb9\xce\xcd\xdd\x3d\x4d\x76\xca\x5a\x22\x52\ +\xd1\xe2\x1a\xfb\xce\xc5\xf1\x5c\x57\x4b\xfd\xdd\x3a\xbb\xdd\x4e\ +\x1c\xc7\xd1\x62\x9b\xaf\xaf\x2f\x09\x57\x2e\x5f\xa6\xbf\xfd\xe3\ +\x50\x42\xca\xda\x75\x07\x74\x7a\xc3\x6a\xcc\xdb\xd1\x27\x16\x09\ +\xc2\x25\x39\x1c\x06\x9e\xe7\x07\x1b\x6a\x6f\xe7\x5d\x28\x38\x5d\ +\x86\xf1\xa2\x01\x6c\xd9\xb2\x85\x84\xd0\xe5\x51\xa6\x94\x35\xeb\ +\x0e\xe9\xf5\xc6\x94\xfe\xde\xee\x83\x15\xd7\xae\x7e\x34\x3e\x3a\ +\xba\x58\x00\xf2\xfa\x4d\xd9\x47\x7c\x03\x02\xd3\x56\xa6\xa4\x9e\ +\x6d\x6d\xac\xcf\xbc\x5b\x53\x5d\x47\x8f\xd1\x04\xd0\xbe\x56\x67\ +\x30\xa6\xf4\xf5\x74\xbd\x7d\xec\xfd\x03\xbf\xa3\xc7\x6c\x36\xab\ +\xd5\xc6\x0b\xc2\x25\x9c\x3c\x21\x33\x27\xb7\xc0\x66\xb5\x64\xb6\ +\x36\x35\xb6\x2d\x1a\x80\x2c\xcb\x6e\x92\xe4\xb0\xb4\x37\x37\x1d\ +\xdc\xb1\xef\xb9\xe7\x44\x51\x8c\xf8\xb2\xe0\xd3\xbf\xc6\x26\x24\ +\x6d\x0e\x0c\x0b\x4b\x92\x1c\x92\x53\x50\x0b\x7c\x57\x6b\x6b\x35\ +\x4e\x77\x3e\xeb\x27\xb9\xbf\xc5\x9c\x16\x73\x66\x7c\xf7\x8e\x4a\ +\xa5\x12\x7b\x3a\xda\xbf\xba\x3f\x34\xf8\x46\xd2\xaa\x35\x25\xdb\ +\xf7\xee\xfb\xec\xdc\x89\xa3\x9b\x00\x62\x60\x51\x00\xd0\x39\x97\ +\x2c\x8f\xd9\xa7\xa6\xc6\xc2\xa3\x62\x9e\x14\x45\x4d\x32\xc7\x17\ +\xec\xf7\xf6\xf5\x8b\x0b\x8b\x8a\xc9\x74\xc9\x2e\x3d\x2f\xf0\xd2\ +\x94\xd5\xe6\x68\xa8\xad\x29\x8a\x88\x59\xb1\xd5\x29\x39\x8d\x2a\ +\x4e\xd5\x23\x6a\x34\xef\x61\xbd\x13\xe2\x73\x3b\xff\xd9\xe9\x9b\ +\x58\x9b\xbb\x22\x29\xf9\x73\x80\x38\x03\x10\xd9\x00\x31\xb1\x10\ +\x80\x07\x92\xe5\x20\x65\xfc\x74\x3b\x1c\x8e\xae\xec\x9d\x7b\x0e\ +\x07\x84\x86\xc5\x61\xdc\x59\x74\xfa\x5f\x5b\xc1\xce\xdb\x21\xcb\ +\x23\x13\xb7\xe7\xed\x3b\x8a\xe7\xbf\x60\xee\xa7\x82\x5a\x3d\x88\ +\xf7\x12\xd3\x0a\x44\x28\xe3\x10\x54\x78\xea\xf8\x17\x77\xaa\x2b\ +\x77\xeb\x0d\xc6\x74\x80\x38\x19\x16\x19\xa5\x59\x0c\x03\xa4\x42\ +\xe8\x58\x2d\x66\x6a\xaa\xab\x25\x17\xb9\x64\x6c\xee\x34\x8f\x8f\ +\x69\x01\x8a\x1a\xeb\x6e\xdb\xb0\xa1\xe0\x94\x9d\x3a\x9e\xe3\x55\ +\x2d\x0d\xf5\x6a\x9c\x8c\xc7\xaf\x0e\xac\x71\x58\xcb\x18\xf4\x62\ +\xfb\x38\x9d\x4e\x06\xe2\x13\x3c\x3e\x0f\x26\x0e\x03\xc4\x47\x60\ +\x22\x0f\xdf\x3b\xe7\x05\xa0\x80\x50\x71\xa4\x16\x45\xb6\x91\x09\ +\x00\xa8\xa3\xa5\xf9\x15\xa0\x09\xd8\xf3\xcb\x97\x0e\x7e\x7e\xf2\ +\xe3\xdd\x37\x4b\x2e\xff\xf3\xe1\x85\xc7\x3f\x7c\x6f\xd7\x6c\x24\ +\xf8\x05\x87\x64\x85\x45\x46\xbb\xb7\x36\x35\x8c\x31\x10\x67\x4f\ +\x1c\x3d\x02\xb7\x68\x57\x26\xa7\xbc\x0f\x10\xa3\x00\xf1\x22\x40\ +\xcc\xef\x82\x99\xb0\x63\x21\x54\x8e\x4d\xca\x96\x7a\x7a\xd9\x97\ +\x7a\x79\x8d\x4f\x4d\xd9\x6e\x40\x68\xdf\x49\x21\xcf\x71\x5f\x68\ +\xb4\xda\xa0\x6d\xbb\xf3\x8e\xc7\x26\x26\x25\x04\x84\x84\xba\xf9\ +\x07\x87\x18\xee\x54\x57\x1c\x1a\x1e\x18\xf8\x23\xde\xfd\x2a\x63\ +\x53\xf6\x5b\xf8\x15\xe7\x65\xc0\xe5\x92\x39\x87\xdd\x7e\x0b\x8f\ +\x3d\x70\x03\x41\x60\xd1\x6c\x7a\x72\x62\xe2\x9a\xa7\xc9\x47\x7c\ +\x6a\xf3\xb6\x2c\x8c\x0d\x50\xbf\xeb\x52\xe1\xb9\x8b\x43\xfd\x7d\ +\x23\x6c\x5d\xf9\xb5\xab\xef\xfa\x06\x06\xa5\xe8\xf4\xfa\x1d\x39\ +\x79\x3f\xcf\x66\x3a\x62\xac\x40\xbc\x2e\x44\x97\xcc\x12\x93\xb7\ +\xaf\xff\xeb\xe8\x27\xba\xda\x5a\xaa\x1e\x09\x80\x09\x48\xa7\x37\ +\x4a\x91\x71\x2b\x5f\xc3\x30\x83\x53\x1a\xaf\xc1\x06\x56\x8c\x6f\ +\x38\xa6\xec\xcf\x84\x46\x46\xbd\x89\xc9\x68\xb8\xc9\x51\x72\xe1\ +\xdf\x6b\x30\xaf\x00\x80\x16\xcc\xc7\x3e\x38\xb0\x33\x65\x4d\x46\ +\xc6\x12\x0f\x8f\x70\xd9\xe9\x7c\x58\x78\x12\x4e\xbe\xcc\x3f\x24\ +\xf4\x0f\x38\xa0\x6e\x31\x0c\x14\xc3\xff\xa3\x6d\x4d\x8d\xb5\xb5\ +\x95\xe5\x45\xd9\xbb\xf6\xbc\x8c\x13\xf0\xa0\xf6\x75\x97\xcb\x55\ +\xd6\xde\xdc\xfc\x2a\xc2\xcf\x3b\x73\xfb\x8e\x67\xed\x53\xb6\xfb\ +\x60\xe2\x30\x98\x18\x03\xd5\x32\xd2\x70\x31\xb6\x29\x9e\x6b\x60\ +\x59\x40\x40\xe8\xf3\xf9\xaf\xfc\x7e\x41\x11\x32\x0c\xe8\x31\x50\ +\x75\x2a\x04\x69\xc6\xa0\x03\xe3\x78\x74\x0f\x8c\xdd\x34\x1a\xad\ +\x13\x46\x8f\x60\x6c\x04\x53\x7b\x21\xff\x91\x1b\x57\x2e\x9d\xc2\ +\x78\x6c\xde\x30\x13\xd4\xfa\x05\xc3\x70\x36\x0a\x74\x06\xc3\xfd\ +\x8e\x7b\xcd\x7f\x02\xcd\x8d\x3b\x9f\x7d\xe1\x18\xd2\xea\x28\xe6\ +\x2a\xbe\x2c\x38\xf3\x26\x4e\xea\xb2\x4c\x4e\xca\xf8\xb4\xa2\xf2\ +\x46\xe9\xc7\x0c\xf0\x40\x6f\x8f\x4c\xdf\xb3\x3d\xc8\x03\x30\x46\ +\xa0\xde\x13\xe1\xc7\xd4\xaa\x82\xff\x4d\xa0\x9f\xe5\x84\x41\x84\ +\x97\x34\x3a\x3c\xfc\x60\x11\x9e\x9c\xf4\x03\x35\x61\x9a\x26\x81\ +\x06\xfa\xba\xd5\xd5\x5f\x5f\xcf\x9f\x7d\x01\x7a\x37\xfc\x10\x06\ +\x58\x9d\x01\xbd\x34\x23\xe8\xf9\x5d\xf0\xa8\xe6\xe5\xe3\x43\x50\ +\xf8\x46\x28\x3c\x19\x0a\x57\xcf\x68\x65\xb1\xcd\x89\x28\xf0\x9b\ +\xb2\x58\x84\x8d\x5b\x73\x5e\x9c\xb2\xd9\x5a\xa6\x65\xa1\x6e\x2f\ +\xb9\x50\x74\xd6\x66\xb3\x99\x85\xf9\x56\x7b\x9a\xbc\xb9\x67\x5e\ +\xfa\xcd\x9f\x91\x13\x5e\x43\xd5\xfc\xbf\x18\x40\x3e\x20\xc9\x61\ +\x27\xdf\x80\xa0\x97\x11\x41\x33\x75\x87\xa3\xec\x9f\xed\x2d\x15\ +\x1d\xb6\xdc\x79\x01\xa4\xa6\x67\xac\x65\xc6\xad\x16\x0b\x49\x48\ +\xb1\x6a\xb8\x8a\x65\x45\x87\x24\xcd\x84\xae\x4b\xe9\x0f\xb2\x22\ +\xcf\x2b\xf5\x60\xb6\xa9\x91\xd2\x39\x96\x45\xd1\x2d\xd0\x18\x5b\ +\xaf\xbc\xc7\x18\x51\x95\x9e\x9c\x9a\x96\x3f\x2f\x00\x77\x0f\xcf\ +\x64\x76\xcf\xf3\x5b\xe6\x43\xdb\x36\x6e\xa0\x53\x85\x45\x34\x38\ +\x7c\x9f\x72\xb3\x37\x61\x33\x35\xf9\x78\x79\x92\x9b\xd1\xa0\x80\ +\x60\xc6\xae\x57\x54\x51\x4a\x7c\x9c\xf2\xcc\xda\xa9\x73\x45\xd4\ +\xd4\xd6\x46\x22\xbe\x7d\x7a\xed\x93\xf8\xde\x8b\x90\x49\xa9\xb4\ +\xac\x82\x9a\x5b\xdb\x98\x2e\xd2\xe6\xbd\x41\x02\x2d\x2f\x83\x42\ +\x37\x83\x81\xa2\x22\xc2\x50\x2c\x54\xc4\x5c\x11\x1e\x1c\x4c\x46\ +\x83\x9e\x8a\xae\x14\xd3\xb8\xd9\x4c\x06\xbd\x9e\x3e\x01\x38\x59\ +\x76\x52\xa0\xbf\x1f\x15\x7e\x75\x85\x0a\xce\x5f\xa4\xde\x81\x01\ +\xb2\xdb\x1d\x0a\x48\x06\xe0\x3f\x65\xe5\x24\x80\xa5\xb4\xc4\x78\ +\x85\x51\x25\x00\x17\x72\xe1\x34\x95\x02\x4d\x5a\xac\x34\x69\xb5\ +\x2a\x2e\x60\xe3\xd1\xf1\x09\xaa\xae\xbb\x4b\x3d\xfd\x83\xe8\x03\ +\xf4\x75\x55\x0d\x8d\x4f\x98\x15\xff\x66\xad\x4f\xa7\xa4\xb8\x58\ +\xf2\x31\x99\x68\xf5\x13\x89\xc4\xae\x1a\x7d\x03\x83\xb4\x61\xcd\ +\x6a\x0a\xc4\x4d\xb8\xe1\x5e\xeb\xec\xed\xd9\xb5\xe0\x1d\x9a\x15\ +\x26\xbd\x4e\x87\x53\xea\x14\xaa\xd9\xf3\x32\x93\x17\x59\xa0\x0b\ +\x8d\x28\x92\x56\x23\x12\x2e\x31\xf0\xa9\x48\x46\xa3\x51\x01\x71\ +\xa1\xe4\x2a\x95\xd7\xd4\x32\x57\x2b\x7a\x49\x8c\x8d\x25\x13\xdc\ +\x75\xf8\xe4\x69\xba\xd7\xde\x41\xab\x92\x12\x68\x56\xd4\xc2\x42\ +\x37\x26\x26\xac\xf6\xae\x6e\x85\x81\x37\xf2\x7f\xad\x4c\x32\x26\ +\x6e\xd7\x37\xa2\x14\xf3\xe4\xe9\xee\xae\x8c\x19\xb8\xa5\x4b\x96\ +\x28\xd4\x56\xc0\xb8\x28\x88\x4a\x81\x67\x1a\x8a\x8e\x08\xa7\xf4\ +\x55\x29\xb4\x6e\x55\x1a\x79\x9b\x3c\xe9\x16\x98\x9b\x29\xf1\xdc\ +\xbc\x00\x60\x7c\x84\xf9\xac\x7f\x70\x88\xde\xf9\xfb\x21\x0a\x0e\ +\xf0\x57\xe6\x3b\xba\x7b\x14\x17\xe8\x75\x5a\x2a\xba\x5c\x42\x76\ +\x84\x99\x11\x3a\x28\xbf\x55\x43\x77\x1a\x9b\x48\xaf\xd5\xcd\x1a\ +\x50\x94\xdf\xd6\xd5\x45\x1f\x1e\x3d\x41\x7e\x3e\xde\x54\x78\xf1\ +\x32\xd6\xf7\x92\xc8\x22\x84\xe7\xcd\x73\x8b\xd1\x37\x5a\x5d\x75\ +\xe5\xc5\xf0\x98\xd8\x5e\xa7\x24\xf9\x8d\xc1\x60\xd5\xc8\x9d\x69\ +\xda\x00\x8a\x75\xd6\xda\xbb\xbb\xa7\x75\x01\x43\x7d\x00\xca\xa8\ +\x15\x67\xa2\xe0\x41\xb6\xe3\x05\xea\x1f\x1a\x82\x56\xfa\x15\xdf\ +\x2b\xeb\xf1\xcd\xf8\xe8\xc8\x51\x61\xc6\xb0\x00\xc5\x7f\xeb\xda\ +\x83\xfb\x60\x67\xd5\xf5\xd2\x5d\xd1\xf1\x89\xfb\xf5\x06\x43\x34\ +\x36\xff\x16\x63\x28\x5c\xff\x33\x34\xc7\xf0\xf4\x3f\x27\x09\xc9\ +\xc8\xe9\xa1\xd5\x68\xcd\x48\x44\xec\x6f\x93\x0a\xdf\xf5\x97\x95\ +\x5e\x3d\xd8\x52\x69\xff\x94\x6d\xc8\xe2\xc1\x14\x97\x94\x1c\xd9\ +\xd7\xd5\xd9\xf3\x8d\x3c\x0e\x71\x5d\x28\x38\x73\xad\xe2\x7a\xe9\ +\x7a\x00\x08\x7e\x14\x80\xef\x14\xaf\x8b\x65\x40\x87\xed\xe9\xad\ +\x39\x3b\x83\xc3\xc3\xdf\x45\x45\xfd\xc5\x60\x7f\x5f\xd5\x74\xed\ +\xe3\xfa\x3b\x5b\x5b\x26\xb2\xb2\xb2\x48\xc0\xa0\x03\x39\xde\x11\ +\x93\x90\xb4\xbf\xb7\xab\x33\xb7\xe1\xf6\xad\x9e\x87\xb3\x99\x52\ +\xfd\x06\xfa\x65\x54\xc0\xb6\xc7\x4d\xc3\x91\x2b\x56\x06\x2e\xf5\ +\xf2\x7c\x01\x3e\xb2\xf5\xf5\x74\x97\xe2\x80\xbd\x73\x34\x46\xc2\ +\xc8\xf0\xf0\xcd\xe1\xa1\xa1\x0f\x8c\x4b\x96\xe4\xff\x68\x7b\x6e\ +\x6d\x6c\x52\x72\x21\xfe\x6e\xf5\xce\xb9\xb0\x3e\x6e\x93\xb5\x3a\ +\x5d\x90\x7f\x50\xc8\x8f\x71\x39\x34\xde\xab\xaf\x7f\x6b\xae\x71\ +\xd6\xac\x88\x1e\x41\xb2\x59\x24\x9d\xcb\xf1\xea\x13\xf1\x71\x0d\ +\xa0\x2c\x27\x3e\x26\x2a\x04\x1c\x85\x7c\xdf\x32\xcc\xee\x99\x48\ +\xb5\x25\xf0\xf7\x69\x69\x74\xe8\xc8\xe6\xcd\x9b\x69\xee\xed\x3a\ +\x35\x35\x95\xfe\x2b\xc0\x00\xfd\x9e\xd0\xaa\x9d\x63\x34\xae\x00\ +\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ +\x00\x00\x0b\xdd\ +\x89\ +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ +\x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ +\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ +\x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ +\x79\x71\xc9\x65\x3c\x00\x00\x03\x71\x69\x54\x58\x74\x58\x4d\x4c\ +\x3a\x63\x6f\x6d\x2e\x61\x64\x6f\x62\x65\x2e\x78\x6d\x70\x00\x00\ +\x00\x00\x00\x3c\x3f\x78\x70\x61\x63\x6b\x65\x74\x20\x62\x65\x67\ +\x69\x6e\x3d\x22\xef\xbb\xbf\x22\x20\x69\x64\x3d\x22\x57\x35\x4d\ +\x30\x4d\x70\x43\x65\x68\x69\x48\x7a\x72\x65\x53\x7a\x4e\x54\x63\ +\x7a\x6b\x63\x39\x64\x22\x3f\x3e\x20\x3c\x78\x3a\x78\x6d\x70\x6d\ +\x65\x74\x61\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x3d\x22\x61\x64\x6f\ +\x62\x65\x3a\x6e\x73\x3a\x6d\x65\x74\x61\x2f\x22\x20\x78\x3a\x78\ +\x6d\x70\x74\x6b\x3d\x22\x41\x64\x6f\x62\x65\x20\x58\x4d\x50\x20\ +\x43\x6f\x72\x65\x20\x35\x2e\x35\x2d\x63\x30\x31\x34\x20\x37\x39\ +\x2e\x31\x35\x31\x34\x38\x31\x2c\x20\x32\x30\x31\x33\x2f\x30\x33\ +\x2f\x31\x33\x2d\x31\x32\x3a\x30\x39\x3a\x31\x35\x20\x20\x20\x20\ +\x20\x20\x20\x20\x22\x3e\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x20\ +\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\x68\x74\x74\x70\x3a\ +\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\ +\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\x2d\x73\x79\x6e\x74\ +\x61\x78\x2d\x6e\x73\x23\x22\x3e\x20\x3c\x72\x64\x66\x3a\x44\x65\ +\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x20\x72\x64\x66\x3a\x61\x62\ +\x6f\x75\x74\x3d\x22\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6d\x70\ +\x4d\x4d\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\ +\x6f\x62\x65\x2e\x63\x6f\x6d\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\ +\x6d\x6d\x2f\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x73\x74\x52\x65\x66\ +\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\ +\x65\x2e\x63\x6f\x6d\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\x73\x54\ +\x79\x70\x65\x2f\x52\x65\x73\x6f\x75\x72\x63\x65\x52\x65\x66\x23\ +\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6d\x70\x3d\x22\x68\x74\x74\ +\x70\x3a\x2f\x2f\x6e\x73\x2e\x61\x64\x6f\x62\x65\x2e\x63\x6f\x6d\ +\x2f\x78\x61\x70\x2f\x31\x2e\x30\x2f\x22\x20\x78\x6d\x70\x4d\x4d\ +\x3a\x4f\x72\x69\x67\x69\x6e\x61\x6c\x44\x6f\x63\x75\x6d\x65\x6e\ +\x74\x49\x44\x3d\x22\x78\x6d\x70\x2e\x64\x69\x64\x3a\x62\x62\x65\ +\x34\x65\x39\x38\x62\x2d\x34\x38\x33\x63\x2d\x62\x63\x34\x33\x2d\ +\x62\x62\x33\x65\x2d\x62\x35\x35\x32\x61\x31\x32\x61\x31\x39\x34\ +\x34\x22\x20\x78\x6d\x70\x4d\x4d\x3a\x44\x6f\x63\x75\x6d\x65\x6e\ +\x74\x49\x44\x3d\x22\x78\x6d\x70\x2e\x64\x69\x64\x3a\x46\x45\x41\ +\x33\x45\x41\x46\x33\x46\x42\x33\x36\x31\x31\x45\x32\x38\x32\x41\ +\x46\x42\x43\x32\x46\x33\x38\x39\x30\x41\x43\x34\x36\x22\x20\x78\ +\x6d\x70\x4d\x4d\x3a\x49\x6e\x73\x74\x61\x6e\x63\x65\x49\x44\x3d\ +\x22\x78\x6d\x70\x2e\x69\x69\x64\x3a\x46\x45\x41\x33\x45\x41\x46\ +\x32\x46\x42\x33\x36\x31\x31\x45\x32\x38\x32\x41\x46\x42\x43\x32\ +\x46\x33\x38\x39\x30\x41\x43\x34\x36\x22\x20\x78\x6d\x70\x3a\x43\ +\x72\x65\x61\x74\x6f\x72\x54\x6f\x6f\x6c\x3d\x22\x41\x64\x6f\x62\ +\x65\x20\x50\x68\x6f\x74\x6f\x73\x68\x6f\x70\x20\x43\x43\x20\x28\ +\x57\x69\x6e\x64\x6f\x77\x73\x29\x22\x3e\x20\x3c\x78\x6d\x70\x4d\ +\x4d\x3a\x44\x65\x72\x69\x76\x65\x64\x46\x72\x6f\x6d\x20\x73\x74\ +\x52\x65\x66\x3a\x69\x6e\x73\x74\x61\x6e\x63\x65\x49\x44\x3d\x22\ +\x78\x6d\x70\x2e\x69\x69\x64\x3a\x34\x37\x33\x38\x33\x34\x65\x30\ +\x2d\x62\x62\x61\x65\x2d\x36\x61\x34\x30\x2d\x61\x31\x37\x33\x2d\ +\x39\x31\x66\x37\x31\x33\x66\x61\x38\x32\x36\x31\x22\x20\x73\x74\ +\x52\x65\x66\x3a\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x44\x3d\x22\ +\x78\x6d\x70\x2e\x64\x69\x64\x3a\x62\x62\x65\x34\x65\x39\x38\x62\ +\x2d\x34\x38\x33\x63\x2d\x62\x63\x34\x33\x2d\x62\x62\x33\x65\x2d\ +\x62\x35\x35\x32\x61\x31\x32\x61\x31\x39\x34\x34\x22\x2f\x3e\x20\ +\x3c\x2f\x72\x64\x66\x3a\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6f\ +\x6e\x3e\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\x46\x3e\x20\x3c\x2f\ +\x78\x3a\x78\x6d\x70\x6d\x65\x74\x61\x3e\x20\x3c\x3f\x78\x70\x61\ +\x63\x6b\x65\x74\x20\x65\x6e\x64\x3d\x22\x72\x22\x3f\x3e\x5e\xcf\ +\xe3\xe7\x00\x00\x08\x02\x49\x44\x41\x54\x78\xda\xac\x57\x79\x50\ +\x55\xd7\x1d\xfe\xbd\x7b\xef\xdb\x41\x76\x65\xdf\x57\x41\xa4\x2c\ +\xa6\x2a\xd8\xd4\x82\x08\x89\x44\xa2\x51\x99\x98\xc4\xda\xc9\xf2\ +\x47\xed\x4c\xd3\x24\x7f\xb4\x93\x99\xfc\xd1\x99\x36\x36\x4d\xd3\ +\x56\x53\xd3\x71\x8c\x26\xb8\x26\xa8\x18\x95\xba\x54\x03\x0e\xa8\ +\x55\x90\x28\x44\x59\x02\xc8\xbe\xef\xcb\x7b\xef\x2e\xaf\xdf\xb9\ +\x80\x45\x63\x9e\xcf\x26\x67\xe6\xce\xbd\xe7\xdc\x7b\xce\xf9\xce\ +\xf7\xfb\x7e\xcb\xd5\xb4\xb5\xb5\x51\x59\x69\x29\x05\x47\x44\x1a\ +\x5d\xdd\xdc\xd2\x14\x59\x31\x10\x91\x86\x9c\x6b\xec\x3b\x3b\xc7\ +\x73\xed\x4d\x77\x6e\xd7\xda\x6c\x36\xe2\x38\x8e\x9c\x6d\xbe\xbe\ +\xbe\x24\x7c\x79\xf1\x22\xfd\x7d\xf7\x9e\xc4\x94\x65\xe9\x3b\x8c\ +\x26\xf3\x13\x18\xb7\xe1\x1a\x73\x12\x84\x5d\x12\x45\x33\xcf\xf3\ +\x7d\x75\x35\xb7\x0a\xce\x16\x17\x5d\x43\xdf\x69\x00\xab\x57\xaf\ +\x26\x21\x34\x32\xda\x3b\x65\x69\xfa\x1e\x93\xc9\x25\xa5\xa7\xab\ +\x63\x67\x65\xc5\xa5\x4f\x47\x87\x87\x9d\x05\xa0\xac\x58\x95\xb3\ +\xcf\x37\x20\x30\x2d\x21\x25\xf5\x44\x73\xfd\x9d\xcc\xdb\x37\xab\ +\x6b\xe9\x31\x9a\x00\xda\x97\x19\xcd\x2e\x29\xdd\x9d\xed\xef\xef\ +\xdf\xb5\xe3\x37\xf4\x98\xcd\x32\x35\x65\xe1\x05\xe1\x02\x4e\x9e\ +\x98\x99\x97\x5f\x6c\x99\x9a\xcc\x6c\x6e\xa8\x6f\x71\x1a\x80\xa2\ +\x28\xae\x92\x24\x4e\xde\x6d\x6c\xd8\xb9\x76\xf3\x4b\x2f\xe9\x74\ +\xba\x88\x73\xc5\xc7\xde\x8b\x4b\x4c\xca\x0e\x0c\x0b\x4b\x92\x44\ +\x49\x16\xb4\x02\xdf\xde\xdc\x5c\x8d\xd3\x9d\xc9\x7a\x26\xff\x57\ +\x18\x33\x60\x6c\x1c\xdf\xfd\x45\xa3\xd1\xe8\x3a\x5b\xef\xfe\x7b\ +\xb0\xbf\xef\xb7\x49\x4b\x96\x96\xad\xd9\xb4\xf9\xf8\x17\x87\x0a\ +\x57\x01\x44\xaf\x53\x00\x70\x71\x76\x45\x19\xb1\x59\xad\x23\xe1\ +\xd1\xb1\x3f\xd6\xe9\xf4\xc9\x1c\x5f\xbc\xdd\xc7\xd7\x2f\x3e\x2c\ +\x3a\x36\xd3\xae\xd8\x4d\xbc\xc0\x4b\xd6\x29\x8b\x58\x57\x73\xb3\ +\x24\x22\x76\x61\xae\x2c\xc9\x2e\x1a\x4e\xd3\xa9\xd3\xeb\x3f\xc4\ +\x7c\x19\xe2\x73\x3d\x73\xbc\xe8\x2a\xe6\xe6\x2f\x4c\x4a\x3e\x09\ +\x10\x47\x01\x22\x07\x20\xc6\x1e\x05\xe0\x9e\x64\x39\x48\x19\xb7\ +\x0e\x51\x14\xdb\x73\xd6\x6d\xdc\x1b\x10\x1a\x16\x8f\x7e\x5b\x49\ +\xd1\xe1\x5c\xb0\xf3\x7e\x48\x64\xd4\xe2\x35\x05\x9b\x0b\xf1\xfc\ +\x27\x8c\x3d\x2b\x68\xb5\x7d\x78\x2f\x31\xad\x40\x84\x0a\x0e\x41\ +\xa7\x3e\x3b\x78\xfa\xeb\xea\xaa\x0d\x26\xb3\xcb\x72\x80\x38\x12\ +\x16\x15\xad\x77\x86\x01\xd2\xc0\x75\xa6\x26\xc7\xa9\xa1\xb6\x86\ +\xec\x64\x57\xb0\xb8\x3c\x3e\x3a\x62\x00\x28\xaa\xaf\xbd\x65\xc1\ +\x82\x82\xac\xc8\x46\x9e\xe3\x35\x4d\x75\x77\xb4\x38\x19\x8f\xbb\ +\x11\xac\x71\x98\xcb\x18\xf4\x62\xeb\xc8\xb2\xcc\x40\x7c\x8e\xc7\ +\x2d\x60\x62\x2f\x40\x7c\x0a\x26\x0a\xf0\xbd\xec\x10\x80\x0a\x42\ +\xc3\x91\x56\xa7\x63\x0b\x79\x03\x00\xb5\x36\x35\xbe\x0e\x34\x01\ +\x1b\x7f\xf1\xea\xce\x93\x47\x0e\x6c\xb8\x5a\x76\xf1\xe3\xb9\x13\ +\x0f\xfe\xf3\xc3\xf5\xb3\x9e\xe0\x17\x1c\x92\x15\x16\x15\xe3\xd6\ +\xdc\x50\x37\xc2\x40\x9c\x38\x54\xb8\x0f\x66\x31\x24\x24\xa7\xec\ +\x02\x88\x61\x80\x78\x05\x20\x1c\x9b\x60\xc6\xed\x98\x0b\x5d\xc7\ +\x22\xd7\xdc\x3d\xbd\x6c\xee\x5e\x5e\xa3\x56\xab\xe5\x0a\x84\xf6\ +\x9d\x14\xf2\x1c\x77\x5a\x6f\x30\x04\x3d\xb5\xa1\xe0\x60\xdc\xe2\ +\xa4\xc4\x80\x90\x50\x57\xff\xe0\x10\xf3\xd7\xd5\x95\x7b\x06\x7a\ +\x7b\x7f\x8f\x77\x2f\x67\xac\xca\x79\x17\x77\x9d\x43\x06\xec\x76\ +\x85\x13\x6d\xb6\xaf\xf0\xd8\x09\x33\x10\x04\x16\xc3\x86\x27\xc6\ +\xc6\x2a\x3c\xbd\xe7\xeb\x7e\x92\xfd\x54\x16\xfa\x66\xa8\xdf\x7e\ +\xe1\xd4\x17\xe7\xfb\x7b\xba\x87\xd8\xbc\xeb\x15\x97\x3e\xf0\x0d\ +\x0c\x4a\x31\x9a\x4c\x6b\xf3\x0a\x5e\xc8\x61\x3a\x62\xac\x40\xbc\ +\x76\x78\x97\xc2\x02\x93\x8f\xaf\xff\x5b\xb8\x0e\xb5\xb7\x34\xdd\ +\x78\x28\x00\x26\x20\xa3\xc9\x45\x8a\x8a\x4f\x78\x13\xdd\x0c\x4e\ +\x6d\xbc\x1e\x0b\x4c\xa1\x7f\x45\xb4\xda\x9e\x0f\x8d\x8a\x7e\x1b\ +\x83\x31\x30\x93\x58\x76\xf6\x5f\x4b\x31\xae\x02\x80\x16\xc6\xf7\ +\x7f\xb4\x63\x5d\xca\xd2\x8c\x8c\x79\x1e\x1e\xe1\x8a\x2c\xcf\x15\ +\x9e\x84\x93\x2f\xf0\x0f\x09\x7d\x07\x07\x34\x3a\xc3\x40\x29\xec\ +\x3f\xdc\xd2\x50\x5f\x53\x53\x75\xbd\x24\x67\xfd\xc6\xd7\x70\x02\ +\x1e\xd4\xbe\x65\xb7\xdb\xaf\xdd\x6d\x6c\x7c\x03\xee\xe7\x93\xb9\ +\x66\xed\x8b\x36\xab\x65\x10\x4c\xec\x05\x13\x23\xa0\x5a\x41\x18\ +\x2e\xc5\x32\xa5\x0f\x6e\xb0\x20\x20\x20\x74\xcb\xb6\xd7\x7f\xf7\ +\x48\x11\x32\x0c\xb8\x62\xa1\xea\x54\x08\x72\x1c\x9d\x56\xf4\x17\ +\xe1\xf2\x40\xdf\x55\xaf\x37\xc8\xd8\x74\x1f\xfa\x2e\x60\x6a\x13\ +\xe4\x3f\x74\xe5\xcb\x0b\x9f\xa1\x3f\xe2\xd0\xcd\x04\xad\xe9\x91\ +\x6e\x38\xeb\x05\x46\xb3\x79\xb0\xf5\x9b\xc6\x3f\x80\xe6\xfa\x75\ +\x2f\x6e\xdd\x8f\xb0\x3a\x8c\xb1\xca\x73\xc5\x47\xdf\xc6\x49\xed\ +\x93\x13\x13\x0a\x3e\xad\xac\xba\x52\x7e\x80\x01\xee\xed\xea\x54\ +\xe8\x7b\xb6\x7b\x71\x00\x9b\x11\xa8\xf7\x84\xfb\x31\xb5\x6a\x60\ +\x7f\x6f\xd0\xcf\x62\x42\x1f\xdc\x4b\x1a\x1e\x18\xb8\x37\x09\x4f\ +\x32\xfd\x40\x4d\x98\xa6\x49\xa0\xde\xee\x0e\x6d\xf5\x7f\x2e\x6f\ +\x9b\x7d\x01\x7a\x9f\xfc\x21\x36\x60\x79\x06\xf4\xd2\x8c\xa0\x1d\ +\x9b\xe0\x61\xcd\x6b\xfe\x7c\x82\xc2\x57\x42\xe1\xc9\x50\xb8\x76\ +\x46\x2b\xce\x36\x19\x5e\xe0\x67\x9d\x9c\x14\x56\xe6\xe6\xbd\x62\ +\xb5\x58\x9a\xa6\x65\xa1\xbd\x5b\x76\xb6\xe4\x84\xc5\x62\x19\x17\ +\x1c\xcd\xf6\xf4\xf6\xe1\x9e\x7f\xf5\x97\x7f\x44\x4c\x78\x13\x59\ +\xf3\xff\x62\x00\xf1\x80\x24\xd1\x46\xbe\x01\x41\xaf\xc1\x83\x66\ +\xf2\x0e\x47\x39\xcf\x6d\x2a\xd7\x89\x96\x7c\x87\x00\x52\x97\x67\ +\x2c\x63\x9b\x03\xf9\xff\x2a\x10\x00\x11\x25\x89\x38\x16\xba\xb5\ +\x02\xdc\x97\x48\x64\x55\x10\xd6\xd6\x21\x84\x23\xfe\x80\x6e\x89\ +\x04\x9e\x57\xbf\x9b\x89\x96\x24\x2b\x56\x5c\xb2\xfa\x0d\x6b\xf0\ +\xaa\xe5\xc9\xa9\x69\xdb\x1c\x02\x70\xf3\xf0\x4c\x9e\x7b\x72\x09\ +\x71\xde\xcb\xdd\x8d\xb6\x6c\x58\x47\xf5\xcd\x2d\x74\xac\xe4\x2c\ +\x79\xba\xbb\xd3\x0b\xeb\x0b\xa8\xb3\xbb\x87\x8e\x9c\x38\x4d\x51\ +\xe1\xa1\xb4\x32\x7d\x19\xde\x9d\xa1\xec\x27\x57\x50\x68\x60\x00\ +\x95\x5c\x28\x25\x1e\xc9\x76\x51\x5c\x2c\x15\x16\x1d\x27\x16\xda\ +\xd9\xba\xd0\x45\x9a\xc3\x0a\x12\x39\x81\xbf\x5f\x50\x12\xa5\x3f\ +\x91\xa6\x52\x98\x14\x1f\x47\xf3\x5c\x5d\x60\x50\x9e\x82\xfc\xfd\ +\x28\x33\x63\x39\x45\x84\x06\xab\x27\x0c\xf2\xf3\xa5\x98\x88\x70\ +\x4a\x4f\x4b\xa1\x73\x97\xca\xc1\x92\x9d\xe6\x7b\x7b\x53\x20\xc6\ +\x45\xe9\xbe\x9a\x51\xf3\xa8\x12\xd6\x3e\xf7\xf4\x0b\x7c\xbc\x69\ +\x49\xd2\x62\xba\x51\x73\x9b\x8c\x7a\x03\xc5\x62\x13\x66\x8a\xfe\ +\x81\x41\xaa\xb8\x5e\x45\xcf\xe6\xae\x26\x57\x17\x33\xd9\x60\xf3\ +\xaa\x9b\xb5\x74\xf3\x76\x1d\xc5\x45\x46\x50\x55\x4d\xad\x0a\xcc\ +\x62\xb5\xaa\x26\x9b\xbb\xbe\xd3\x35\x34\xaa\x20\xca\x4c\x5f\xae\ +\x52\x99\xb8\x30\x46\x1d\x4b\x4e\x4c\x20\xbd\x4e\xcb\xd2\x38\x9d\ +\x3c\x7f\x91\x79\x1b\x65\xad\x48\xa7\x89\x29\x8b\xca\xcc\xc7\x87\ +\x3f\x27\x2f\x0f\x77\xda\xba\xe9\x39\x95\x05\xab\xd5\xe6\x30\x1d\ +\x7f\x67\xba\x66\x62\x8a\x0c\x0b\xa1\xf4\x25\x29\xb4\x7b\xff\x61\ +\x7a\xe7\xcf\x7f\xa5\xbd\x47\x8a\x54\x06\x22\x42\x43\xc8\xa0\xd7\ +\x11\x5c\x8a\x8e\x9e\x3e\x43\xc1\x01\xfe\x6a\x61\x12\x1f\x13\x45\ +\xbf\x7e\x79\x2b\x2d\x00\xf5\xa3\x63\xe3\x64\x36\x19\x1f\xf6\xcf\ +\xc0\x39\x14\x21\x4a\xad\xa1\x59\x15\x8f\x4f\x4c\xd0\xdf\xf6\x7c\ +\x42\xcd\x6d\xed\xe4\xe1\xe6\xa6\xde\xff\xf1\xc9\x01\x9a\x98\x9c\ +\xa4\x8e\xae\x6e\xd5\x56\xad\x1d\x9d\xf4\xde\xae\xdd\x30\x81\x48\ +\xdd\x7d\x7d\x78\x37\x1d\x7b\xea\x9b\x9a\xa1\x01\x2f\xd5\x33\xb4\ +\x33\x5e\xa0\xee\xce\xf3\xe3\xc2\xc3\xec\x3d\xdb\x6a\xab\xab\xce\ +\x87\xc7\xc6\x75\xc9\x92\xe4\xd7\x3f\x38\x44\x3d\xfd\x03\xf7\xdc\ +\x88\xa9\xb8\x01\x9e\x30\xed\x62\x8a\x3a\x0e\xc0\xd4\xd8\x72\x57\ +\x55\xb9\x16\xd1\xb5\xa6\xae\x9e\xa5\x59\x75\x53\xe6\x25\x6c\x03\ +\x36\xae\x46\x40\x8c\x8d\x0e\x0f\x15\x0a\x33\x1b\x0b\xa0\xed\x5b\ +\x65\x0f\xea\xc1\xb6\x1b\x97\xcb\xd7\xc7\x2c\x5a\xbc\xdd\x64\x36\ +\xc7\x60\xd3\xfb\x18\x43\x8c\xf8\x16\x6b\x4c\x0f\x73\x9e\xf1\xe7\ +\x24\x21\x18\xc9\x1e\x06\x83\x71\x1c\x81\x88\xb9\x80\x06\x9b\xf7\ +\x5c\x2b\xbf\xb4\xb3\xa9\xca\x76\x8c\x2d\xc8\x12\x8b\x77\x7c\x52\ +\x72\x54\x77\x7b\x5b\xe7\x7d\x6e\x07\x2a\xcf\x16\x1f\xad\xa8\xbc\ +\x5c\xbe\x02\x00\x82\x1f\x04\xe0\xd0\x7d\x58\x40\x12\x45\xcb\x4f\ +\x73\xf3\xd6\x05\x87\x87\x7f\x80\x8c\xfa\xf3\xbe\x9e\xee\x1b\xd3\ +\xb9\x8f\xeb\x69\x6b\x6e\x1a\xcb\xca\xca\x22\x01\x9d\x56\xc4\x78\ +\x31\x36\x31\x69\x7b\x57\x7b\x5b\x7e\xdd\xad\xaf\x3a\x99\x88\xe6\ +\xb6\x81\xde\x1e\x05\x19\xb0\xe5\x71\xc3\x70\xd4\xc2\x84\x40\x77\ +\x2f\xcf\xad\xb0\x89\xa5\xbb\xb3\xa3\x1c\x07\xec\x7a\x40\x63\x24\ +\x0c\x0d\x0c\x5c\x1d\xe8\xef\xff\xc8\x65\xde\xbc\x6d\x3f\x5b\x93\ +\x5f\x13\x97\x94\x7c\x0a\xbf\x5b\x5d\x4e\x78\x88\xc3\x7f\x46\x83\ +\xd1\x18\xe4\x1f\x14\xf2\x34\x8a\x43\x97\x6f\xee\xdc\x79\xf7\xc1\ +\xcd\x59\x9b\x9a\x9a\x22\x41\xb2\x4c\x4a\x46\xbb\xf8\xc6\x8f\x16\ +\xc5\xd7\x81\xb2\xbc\x45\xb1\xd1\x21\xe0\x28\xe4\xfb\xa6\x61\xfb\ +\x74\xa8\x2d\x83\xbd\x8b\xa4\xe1\xfe\x7d\xd9\xd9\xd9\xf4\x60\x75\ +\x9d\x9a\x9a\x4a\xff\x15\x60\x00\x38\xf0\xbb\x5d\x6e\xf5\xd0\xf0\ +\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x12\x6c\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ @@ -1224,6 +1610,14 @@ \x00\x69\ \x00\x63\x00\x6f\x00\x6e\x00\x5f\x00\x72\x00\x65\x00\x73\x00\x74\x00\x6f\x00\x72\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0c\ +\x01\x5d\x9f\x87\ +\x00\x69\ +\x00\x63\x00\x6f\x00\x6e\x00\x5f\x00\x75\x00\x74\x00\x66\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x0d\ +\x0a\xd8\xdc\xe7\ +\x00\x69\ +\x00\x63\x00\x6f\x00\x6e\x00\x5f\x00\x61\x00\x6e\x00\x73\x00\x69\x00\x2e\x00\x70\x00\x6e\x00\x67\ +\x00\x0c\ \x09\xf7\x1c\xa7\ \x00\x75\ \x00\x74\x00\x6c\x00\x5f\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\ @@ -1231,17 +1625,19 @@ qt_resource_struct = "\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0a\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0c\ \x00\x00\x00\x0e\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ -\x00\x00\x00\x22\x00\x02\x00\x00\x00\x06\x00\x00\x00\x04\ +\x00\x00\x00\x22\x00\x02\x00\x00\x00\x08\x00\x00\x00\x04\ \x00\x00\x00\x50\x00\x00\x00\x00\x00\x01\x00\x00\x07\x7d\ +\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x35\xf8\ \x00\x00\x00\x70\x00\x00\x00\x00\x00\x01\x00\x00\x10\x77\ \x00\x00\x00\xb6\x00\x00\x00\x00\x00\x01\x00\x00\x21\x8f\ +\x00\x00\x01\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x41\xf8\ \x00\x00\x00\x92\x00\x00\x00\x00\x00\x01\x00\x00\x19\xde\ \x00\x00\x00\xda\x00\x00\x00\x00\x00\x01\x00\x00\x2c\x1a\ \x00\x00\x00\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ -\x00\x00\x00\x22\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0b\ -\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x35\xf8\ +\x00\x00\x00\x22\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0d\ +\x00\x00\x01\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x4d\xd9\ " def qInitResources(): diff --git a/qthostsui.py b/qthostsui.py index d9f26df..c44bacc 100644 --- a/qthostsui.py +++ b/qthostsui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'qthostsui.ui' # -# Created: Mon Jul 22 15:51:02 2013 +# Created: Fri Aug 02 19:08:24 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! @@ -177,6 +177,22 @@ def setupUi(self, HostsUtlMain): self.ButtonCheck.setIcon(icon6) self.ButtonCheck.setIconSize(QtCore.QSize(32, 32)) self.ButtonCheck.setObjectName(_fromUtf8("ButtonCheck")) + self.ButtonANSI = QtGui.QPushButton(self.frame) + self.ButtonANSI.setGeometry(QtCore.QRect(0, 160, 48, 48)) + self.ButtonANSI.setText(_fromUtf8("")) + icon7 = QtGui.QIcon() + icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/buttons/img/icon_ansi.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.ButtonANSI.setIcon(icon7) + self.ButtonANSI.setIconSize(QtCore.QSize(32, 32)) + self.ButtonANSI.setObjectName(_fromUtf8("ButtonANSI")) + self.ButtonUTF = QtGui.QPushButton(self.frame) + self.ButtonUTF.setGeometry(QtCore.QRect(60, 160, 48, 48)) + self.ButtonUTF.setText(_fromUtf8("")) + icon8 = QtGui.QIcon() + icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/buttons/img/icon_utf.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.ButtonUTF.setIcon(icon8) + self.ButtonUTF.setIconSize(QtCore.QSize(32, 32)) + self.ButtonUTF.setObjectName(_fromUtf8("ButtonUTF")) self.InfoBox = QtGui.QGroupBox(HostsUtlMain) self.InfoBox.setGeometry(QtCore.QRect(10, 220, 240, 90)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) @@ -226,6 +242,8 @@ def setupUi(self, HostsUtlMain): QtCore.QObject.connect(self.ButtonCheck, QtCore.SIGNAL(_fromUtf8("clicked()")), HostsUtlMain.on_CheckUpdate_clicked) QtCore.QObject.connect(self.ButtonUpdate, QtCore.SIGNAL(_fromUtf8("clicked()")), HostsUtlMain.on_FetchUpdate_clicked) QtCore.QObject.connect(self.SelectLang, QtCore.SIGNAL(_fromUtf8("currentIndexChanged(QString)")), HostsUtlMain.on_Lang_changed) + QtCore.QObject.connect(self.ButtonANSI, QtCore.SIGNAL(_fromUtf8("clicked()")), HostsUtlMain.on_MakeANSI_clicked) + QtCore.QObject.connect(self.ButtonUTF, QtCore.SIGNAL(_fromUtf8("clicked()")), HostsUtlMain.on_MakeUTF8_clicked) QtCore.QMetaObject.connectSlotsByName(HostsUtlMain) HostsUtlMain.setTabOrder(self.SelectMirror, self.SelectIP) HostsUtlMain.setTabOrder(self.SelectIP, self.Functionlist) @@ -259,6 +277,10 @@ def retranslateUi(self, HostsUtlMain): self.ButtonExit.setWhatsThis(_translate("HostsUtlMain", "Close this tool.", None)) self.ButtonCheck.setToolTip(_translate("HostsUtlMain", "Check update / Refresh", None)) self.ButtonCheck.setWhatsThis(_translate("HostsUtlMain", "Check the latest version of hosts data file.", None)) + self.ButtonANSI.setToolTip(_translate("HostsUtlMain", "Save with ANSI", None)) + self.ButtonANSI.setWhatsThis(_translate("HostsUtlMain", "Export to hosts file encoding by ANSI.", None)) + self.ButtonUTF.setToolTip(_translate("HostsUtlMain", "Save with UTF-8", None)) + self.ButtonUTF.setWhatsThis(_translate("HostsUtlMain", "Export to hosts file encoding by UTF-8.", None)) self.InfoBox.setTitle(_translate("HostsUtlMain", "Hosts Info", None)) self.labelVersion.setText(_translate("HostsUtlMain", "Version", None)) self.labelVersionData.setText(_translate("HostsUtlMain", "N/A", None)) diff --git a/qthostsui.ui b/qthostsui.ui index 98924f3..2bdb5b1 100644 --- a/qthostsui.ui +++ b/qthostsui.ui @@ -430,6 +430,64 @@ + + + + 0 + 160 + 48 + 48 + + + + Save with ANSI + + + Export to hosts file encoding by ANSI. + + + + + + + :/buttons/img/icon_ansi.png:/buttons/img/icon_ansi.png + + + + 32 + 32 + + + + + + + 60 + 160 + 48 + 48 + + + + Save with UTF-8 + + + Export to hosts file encoding by UTF-8. + + + + + + + :/buttons/img/icon_utf.png:/buttons/img/icon_utf.png + + + + 32 + 32 + + + @@ -532,6 +590,9 @@ ButtonUpdate ButtonBackup ButtonRestore + ButtonANSI + ButtonUTF + SelectLang @@ -697,6 +758,38 @@ + + ButtonANSI + clicked() + HostsUtlMain + on_MakeANSI_clicked() + + + 549 + 203 + + + 517 + 176 + + + + + ButtonUTF + clicked() + HostsUtlMain + on_MakeUTF8_clicked() + + + 607 + 208 + + + 634 + 177 + + + on_Mirror_changed(int) @@ -708,5 +801,7 @@ on_CheckUpdate_clicked() on_FetchUpdate_clicked() on_Lang_changed(QString) + on_MakeANSI_clicked() + on_MakeUTF8_clicked() diff --git a/utilities.py b/utilities.py index 8ebbabf..cbb317f 100644 --- a/utilities.py +++ b/utilities.py @@ -20,6 +20,7 @@ __all__ = ["Utilities", "LangUtilities"] +import ConfigParser import locale import math import os @@ -126,6 +127,26 @@ def check_privileges(cls): except KeyError: return (os.environ['USER'], False) + @classmethod + def set_network(cls, conf_file="network.conf"): + """Read network config file + + Get configurations for mirrors to connect to. + + Returns: + A dictionary containing tag, test url, and update url of mirrors. + """ + conf = ConfigParser.ConfigParser() + conf.read(conf_file) + mirrors = [] + for sec in conf.sections(): + mirror = {} + mirror["tag"] = sec + mirror["test_url"] = conf.get(sec, "server") + mirror["update"] = conf.get(sec, "update") + mirrors.append(mirror) + return mirrors + @classmethod def timestamp_to_date(cls, timestamp): """Transform timestamp to readable string - Class Method