editjsoninzip-0.1.3
توضیحات
Update JSON file inside of the ZIP file
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | editjsoninzip-0.1.3 |
| نام | editjsoninzip |
| نسخه کتابخانه | 0.1.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jamal Shahverdiev |
| ایمیل نویسنده | jamal.shahverdiev@gmail.com |
| آدرس صفحه اصلی | https://github.com/jamalshahverdiev/python-general-codes/tree/master/editJsonInZipFile |
| آدرس اینترنتی | https://pypi.org/project/editjsoninzip/ |
| مجوز | - |
*******************************************************************************************************
Extract ZIP file. Edit JSON to update with new value of the key. Compress all files to tne new ZIP file
*******************************************************************************************************
.. image:: https://img.shields.io/codecov/c/github/codecov/example-python.svg
Python script to extract ZIP file utdate JOSN key/value and create new ZIP file.
* **zipper.py** - Script contains four functions. ``read_zip_file``, ``update_json_file``, ``get_all_file_paths`` and ``prepareZipFile``.
* ``read_zip_file`` - This function prints content of ZIP file and extract in the same folder.
* ``update_json_file`` - This function opens JSON file and edit defined key to the defined value.
* ``get_all_file_paths`` - This function creates list of the all files from argument PATH.
* ``prepareZipFile`` - This function will use ``get_all_file_paths`` function to get all files PATH and then archive them to the other file.
=====
Usage
=====
Requirements:
Python3.4 with ``simplejson`` and ``argparse`` library installed:
Syntax:
.. code-block:: bash
# ./zipper.py
usage: zipper.py [-h] -zin ZIPINPUT -zout ZIPTOOUT -jsonf JSONFILE
zipper.py: error: the following arguments are required: -zin, -zout, -jsonf
..
نیازمندی
| مقدار | نام |
|---|---|
| - | simplejson |
نحوه نصب
نصب پکیج whl editjsoninzip-0.1.3:
pip install editjsoninzip-0.1.3.whl
نصب پکیج tar.gz editjsoninzip-0.1.3:
pip install editjsoninzip-0.1.3.tar.gz