aboutsummaryrefslogtreecommitdiffstats
path: root/cli/unzip-gbk.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/unzip-gbk.py')
-rwxr-xr-xcli/unzip-gbk.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/cli/unzip-gbk.py b/cli/unzip-gbk.py
deleted file mode 100755
index 423e10f..0000000
--- a/cli/unzip-gbk.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# unzip-gbk.py
-#
-# http://note.ninehills.info/linux-gbk.html
-#
-
-import os
-import sys
-import zipfile
-
-print "Processing File " + sys.argv[1]
-
-file=zipfile.ZipFile(sys.argv[1],"r");
-for name in file.namelist():
- utf8name=name.decode('gbk')
- print "Extracting " + utf8name
- pathname = os.path.dirname(utf8name)
- if not os.path.exists(pathname) and pathname!= "":
- os.makedirs(pathname)
- data = file.read(name)
- if not os.path.exists(utf8name):
- fo = open(utf8name, "w")
- fo.write(data)
- fo.close
-file.close()