%global _empty_manifest_terminate_build 0 Name: python-excel2json-3 Version: 0.1.6 Release: 1 Summary: Convert Excel Sheet into JSON file. License: Distributed under terms of the AGPL license. URL: https://github.com/toransahu/excel2json-3 Source0: https://mirrors.nju.edu.cn/pypi/web/packages/98/7d/557db0654be5a6db7964de98ceaef8856002ab6961707a916b92f2ace55c/excel2json-3-0.1.6.tar.gz BuildArch: noarch Requires: python3-xlrd Requires: python3-openpyxl Requires: python3-requests %description # Excel to JSON Converter [![Build Status](https://travis-ci.org/toransahu/excel2json-3.svg?branch=master)](https://travis-ci.org/toransahu/excel2json-3) [![PyPI version](https://badge.fury.io/py/excel2json-3.svg)](https://badge.fury.io/py/excel2json-3) ![Python Version](https://img.shields.io/badge/python-3%2C%203.6-yellow.svg) ![Issues](https://img.shields.io/github/issues/toransahu/excel2json-3.svg) ![Forks](https://img.shields.io/github/forks/toransahu/excel2json-3.svg) ![Stars](https://img.shields.io/github/stars/toransahu/excel2json-3.svg) ![License](https://img.shields.io/github/license/toransahu/excel2json-3.svg) [![Say Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/toransahu) A minimal API that converts MS Excel (.xls & .xlsx) files, or from a given URL into JSON files. ## Features - Download as package using [`pip`](https://pypi.org/project/pip/) and use in your code. - Supports both type of MS Excel file formats - MS Excel 2003 (.xls) - MS Excel 2007 (.xlsx) - It also comes with command line interface (CLI) which facilitates the conversion from URL or local MS Excel file to JSON files. Example: - GET file from URL & convert to JSON. ```bash excel2json-3 --urls https://example.com/example.xls ``` - GET file from disk & convert to JSON. ```bash excel2json-3 --file /home/ubuntu/Documents/example.xlsx ``` ## Contribution You can contribute in following ways: - Report bugs - Add more "APIs" - Give suggestions to make it better - Fix issues & submit a pull request ## Installation ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) ```bash pipenv install excel2json-3 ``` ### Using [`pip`](https://pypi.org/project/pip/) ```bash pip install excel2json-3 ``` ## Uses ### Convert MS Excel File to JSON file ```python from excel2json import convert_from_file EXCEL_FILE = '../example.xls' # or '../example.xlsx' convert(EXCEL_FILE) ``` ### Convert to JSON file directly from URL ```python from excel2json import convert_from_url EXCEL_FILE_URL = 'https://www.example.com/example.xlsx' convert(EXCEL_FILE_URL) ``` # DEVELOPEMENT ## Pre-requisites 1. Python 3 ## Create Virtual Enviroment ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) 1. Install pipenv ``` pip install pipenv ``` 2. Create env ``` cd excel2json-3 # cd pipenv --three install ``` 3. Activate env ``` pipenv shell ``` 4. Install requirements from Pipefile ``` pipenv sync ``` ### Using [`virtualenv`](https://pypi.org/project/virtualenv/) 1. Install virtualenv ``` pip install virtualenv ``` 2. Create virtualenv ``` mkdir myvenv cd myvenv virtualenv myvenv ``` 3. Activate `myvenv` venv ``` source myvenv/bin/activate or . myvenv/bin/activate ``` 4. Install from requirements.txt ``` pip install -r requirements.txt ``` # Testing ``` pytest tests/test.py ``` %package -n python3-excel2json-3 Summary: Convert Excel Sheet into JSON file. Provides: python-excel2json-3 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-excel2json-3 # Excel to JSON Converter [![Build Status](https://travis-ci.org/toransahu/excel2json-3.svg?branch=master)](https://travis-ci.org/toransahu/excel2json-3) [![PyPI version](https://badge.fury.io/py/excel2json-3.svg)](https://badge.fury.io/py/excel2json-3) ![Python Version](https://img.shields.io/badge/python-3%2C%203.6-yellow.svg) ![Issues](https://img.shields.io/github/issues/toransahu/excel2json-3.svg) ![Forks](https://img.shields.io/github/forks/toransahu/excel2json-3.svg) ![Stars](https://img.shields.io/github/stars/toransahu/excel2json-3.svg) ![License](https://img.shields.io/github/license/toransahu/excel2json-3.svg) [![Say Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/toransahu) A minimal API that converts MS Excel (.xls & .xlsx) files, or from a given URL into JSON files. ## Features - Download as package using [`pip`](https://pypi.org/project/pip/) and use in your code. - Supports both type of MS Excel file formats - MS Excel 2003 (.xls) - MS Excel 2007 (.xlsx) - It also comes with command line interface (CLI) which facilitates the conversion from URL or local MS Excel file to JSON files. Example: - GET file from URL & convert to JSON. ```bash excel2json-3 --urls https://example.com/example.xls ``` - GET file from disk & convert to JSON. ```bash excel2json-3 --file /home/ubuntu/Documents/example.xlsx ``` ## Contribution You can contribute in following ways: - Report bugs - Add more "APIs" - Give suggestions to make it better - Fix issues & submit a pull request ## Installation ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) ```bash pipenv install excel2json-3 ``` ### Using [`pip`](https://pypi.org/project/pip/) ```bash pip install excel2json-3 ``` ## Uses ### Convert MS Excel File to JSON file ```python from excel2json import convert_from_file EXCEL_FILE = '../example.xls' # or '../example.xlsx' convert(EXCEL_FILE) ``` ### Convert to JSON file directly from URL ```python from excel2json import convert_from_url EXCEL_FILE_URL = 'https://www.example.com/example.xlsx' convert(EXCEL_FILE_URL) ``` # DEVELOPEMENT ## Pre-requisites 1. Python 3 ## Create Virtual Enviroment ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) 1. Install pipenv ``` pip install pipenv ``` 2. Create env ``` cd excel2json-3 # cd pipenv --three install ``` 3. Activate env ``` pipenv shell ``` 4. Install requirements from Pipefile ``` pipenv sync ``` ### Using [`virtualenv`](https://pypi.org/project/virtualenv/) 1. Install virtualenv ``` pip install virtualenv ``` 2. Create virtualenv ``` mkdir myvenv cd myvenv virtualenv myvenv ``` 3. Activate `myvenv` venv ``` source myvenv/bin/activate or . myvenv/bin/activate ``` 4. Install from requirements.txt ``` pip install -r requirements.txt ``` # Testing ``` pytest tests/test.py ``` %package help Summary: Development documents and examples for excel2json-3 Provides: python3-excel2json-3-doc %description help # Excel to JSON Converter [![Build Status](https://travis-ci.org/toransahu/excel2json-3.svg?branch=master)](https://travis-ci.org/toransahu/excel2json-3) [![PyPI version](https://badge.fury.io/py/excel2json-3.svg)](https://badge.fury.io/py/excel2json-3) ![Python Version](https://img.shields.io/badge/python-3%2C%203.6-yellow.svg) ![Issues](https://img.shields.io/github/issues/toransahu/excel2json-3.svg) ![Forks](https://img.shields.io/github/forks/toransahu/excel2json-3.svg) ![Stars](https://img.shields.io/github/stars/toransahu/excel2json-3.svg) ![License](https://img.shields.io/github/license/toransahu/excel2json-3.svg) [![Say Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/toransahu) A minimal API that converts MS Excel (.xls & .xlsx) files, or from a given URL into JSON files. ## Features - Download as package using [`pip`](https://pypi.org/project/pip/) and use in your code. - Supports both type of MS Excel file formats - MS Excel 2003 (.xls) - MS Excel 2007 (.xlsx) - It also comes with command line interface (CLI) which facilitates the conversion from URL or local MS Excel file to JSON files. Example: - GET file from URL & convert to JSON. ```bash excel2json-3 --urls https://example.com/example.xls ``` - GET file from disk & convert to JSON. ```bash excel2json-3 --file /home/ubuntu/Documents/example.xlsx ``` ## Contribution You can contribute in following ways: - Report bugs - Add more "APIs" - Give suggestions to make it better - Fix issues & submit a pull request ## Installation ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) ```bash pipenv install excel2json-3 ``` ### Using [`pip`](https://pypi.org/project/pip/) ```bash pip install excel2json-3 ``` ## Uses ### Convert MS Excel File to JSON file ```python from excel2json import convert_from_file EXCEL_FILE = '../example.xls' # or '../example.xlsx' convert(EXCEL_FILE) ``` ### Convert to JSON file directly from URL ```python from excel2json import convert_from_url EXCEL_FILE_URL = 'https://www.example.com/example.xlsx' convert(EXCEL_FILE_URL) ``` # DEVELOPEMENT ## Pre-requisites 1. Python 3 ## Create Virtual Enviroment ### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended) 1. Install pipenv ``` pip install pipenv ``` 2. Create env ``` cd excel2json-3 # cd pipenv --three install ``` 3. Activate env ``` pipenv shell ``` 4. Install requirements from Pipefile ``` pipenv sync ``` ### Using [`virtualenv`](https://pypi.org/project/virtualenv/) 1. Install virtualenv ``` pip install virtualenv ``` 2. Create virtualenv ``` mkdir myvenv cd myvenv virtualenv myvenv ``` 3. Activate `myvenv` venv ``` source myvenv/bin/activate or . myvenv/bin/activate ``` 4. Install from requirements.txt ``` pip install -r requirements.txt ``` # Testing ``` pytest tests/test.py ``` %prep %autosetup -n excel2json-3-0.1.6 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-excel2json-3 -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.1.6-1 - Package Spec generated