1. Yuji Hanamura
  2. ZipExtractAllForN9

Commits

Yuji Hanamura  committed b7ca8ac

Create ZipExtractAll Project.

  • Participants
  • Branches default

Comments (0)

Files changed (4)

File build_zipextractall.py

View file
  • Ignore whitespace
+#!/usr/bin/env python
+
+import pypackager
+import os
+
+__version__ = '0.0.1'
+__build__ = '6'
+__author__ = "yuji.developer"
+__mail__ = "yuji.developer@gmail.com"
+
+if __name__ == "__main__":
+    try:
+        os.chdir(os.path.dirname(sys.argv[0]))
+    except:
+        pass
+
+    p=pypackager.PyPackager("zipextractall")
+    p.version = __version__
+    p.buildversion = __build__
+    p.description="Zip extratall tool."
+    p.upgrade_description = ""
+    p.author=__author__
+    p.maintainer=__author__
+    p.email=__mail__
+    p.depends = "python2.6"
+    p.section="user/utilities"
+    p.arch="armel"
+    p.urgency="low"
+    p.icon='zipextractall.png'
+    p.distribution="harmattan"
+    p.repository="extras-devel"
+    p.bugtracker = 'http://yujideveloper.wordpress.com/'
+    dir_name = "src"
+    for root, dirs, files in os.walk(dir_name):
+      real_dir = root[len(dir_name):]
+      fake_file = []      
+      for f in files:
+        fake_file.append(root + os.sep + f + "|" + f)
+      if len(fake_file) > 0:
+        p[real_dir] = fake_file
+    p.postinstall = '''#!/bin/sh
+chmod +x /usr/bin/zipextractall'''
+    p.changelog = changelog="* Initial Release"
+    print p
+    #print p.generate(build_binary=False,build_src=True)
+    print p.generate(build_binary=True,build_src=False)

File src/usr/bin/zipextractall

View file
  • Ignore whitespace
+#!/bin/sh
+
+python /usr/lib/zip_extractall.py $*
+

File src/usr/lib/zip_extractall.py

View file
  • Ignore whitespace
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import zipfile
+
+
+for name in sys.argv[1:]:
+    zf = zipfile.ZipFile(name)
+    zf.extractall()
+    zf.close()
+

File zipextractall.png

  • Ignore whitespace
Added
New image