{
"info": {
"author": "Hiroshi Sano",
"author_email": "hrs.sano645@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "What's This?\n============\nPycgettb is convert guided form excel files to text data. No special programming is required.\n\nFirst, prepare the same xlsx format of the data and the template, to define the text data using the jinja2-based template.\n\nThis command/library is currently alpha version\n===============================================\n\nRecommended to use it in virtual environment.\n\nDependencies\n============\n\n- Python 3.6, 2.7(Development by 3.6)\n- `openpyxl `_\n- `Jinja2 `_\n- `Click `_\n\nInstall\n=======\n\nUsing pip\n---------\n\n::\n\n # Example, Using Python3 venv module.\n $ python3 -m venv env\n $ source env/bin/activate\n (env)$ pip install pycgettb\n\nUsing by Github\n---------------\n\n::\n\n $ git clone https://github.com/hrsano645/pycgettb.git\n $ cd pycgettb\n\n # Example, Using Python3 venv module.\n $ python3 -m venv env\n $ source env/bin/activate\n\n (env)$ pip install -r requirements.txt\n\nCommand Usage\n=============\n\n::\n\n (env)$ pycgettbcli --help\n Usage: pycgettbcli [OPTIONS] SRC_TEMPLATE SRC_DATA EXPORT_TEMPLATE\n\n Options:\n --export_filename TEXT Set export filename\n --help Show this message and exit.\n\n\n- `--export_filename`: If not specified, create a file named `exported_data.txt`.\n\nHow To Use\n==========\n\nWhen using pycgettb, prepare three files. The sample file is `./tests/testfiles/`.\n\nSource Data: An xlsx file containing the data.\n\n.. image:: https://github.com/hrsano645/pycgettb/blob/master/docs/img/example_data_img.png?raw=true\n :alt: source data file image\n\nSource Template: An xlsx file with embedded template variables. Make the same worksheet and cell layout of the source data file.\n\n.. image:: https://github.com/hrsano645/pycgettb/blob/master/docs/img/example_template_img.png?raw=true\n :alt: source template file image\n\nExport Template: The jinja2 template file (html, json, csv, etc...)\n\n\u203b:The jinja2 template currently supports variables only.\n\n::\n\n \n \n
\n \n {{ title }}\n \n \n\n {{ title }}
\n\n \n \n | date | \n name | \n note | \n
\n \n | {{ date_1 }} | \n {{ name_1 }} | \n {{ note_1 }} | \n
\n \n | {{ date_2 }} | \n {{ name_2 }} | \n {{ note_2 }} | \n
\n
\n \n \n\nTemplate files(source template, export template) must be the same template variable name. Based on that convert to text data using jinja2.\n\n::\n\n (env)$ pycgettbcli ./tests/testfiles/template.xlsx ./tests/testfiles/data.xlsx ./tests/testfiles/export_template.html\n\nConverted result. Default file name is exported_data.txt\n\n::\n\n \n \n \n \n Example Title\n \n \n\n Example Title
\n\n \n \n | date | \n name | \n note | \n
\n \n | 2017-01-01 00:00:00 | \n suzuki | \n \u65e5\u672c\u8a9e\u30c6\u30b9\u30c8 | \n
\n \n | 2017-01-02 00:00:00 | \n sato | \n None | \n
\n
\n \n \n\nUsing as a Library\n==================\n\npycgettb can also be used as a library.\n\n::\n\n from pycgettb import Source\n from pycgettb import TextRender\n\n # set file path\n src_template = \"[source template file path]\"\n src_data = \"[source data file path]\"\n export_template = \"[export template file path]\"\n\n # define export filename\n export_filename = \"exported_file.txt\"\n\n source = Source(src_template, src_data)\n source_data_map = source.parse()\n\n textrender = TextRender(export_template, source_data_map)\n\n # write rendreing textdata\n with open(export_filename, \"w\") as export_file:\n export_file.write(textrender.render())\n\nFuture Work\n===========\n\n- Building a command binary for Windows, macOS, Linux.\n- Add list type to source template variable\n- GUI Frontend\n- API Document\n\nLicense\n=======\n\nMIT License\n\n\n\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/hrsano645/pycgettb",
"keywords": "excel xlsx convert jinja2 template",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "pycgettb",
"package_url": "https://pypi.org/project/pycgettb/",
"platform": "",
"project_url": "https://pypi.org/project/pycgettb/",
"project_urls": {
"Homepage": "https://github.com/hrsano645/pycgettb"
},
"release_url": "https://pypi.org/project/pycgettb/0.1.2/",
"requires_dist": [
"jinja2",
"click",
"openpyxl"
],
"requires_python": "",
"summary": "convert guided form excel to text data by template base",
"version": "0.1.2"
},
"last_serial": 3403029,
"releases": {
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "ce783936719cd677d0f5fecc7fcf7cac",
"sha256": "48e7dc1006372fb632a4ade68e273619d2b3f22c082e02312d023b8097b332f5"
},
"downloads": -1,
"filename": "pycgettb-0.1.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ce783936719cd677d0f5fecc7fcf7cac",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 9457,
"upload_time": "2017-12-09T06:59:14",
"url": "https://files.pythonhosted.org/packages/5a/af/f8784e9ba4508f18fae6c0dae72b442ad7f05793ca2990a47c859d57940c/pycgettb-0.1.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9f4740636d4acc56062392654d8fdfae",
"sha256": "1c9ed848c1e9650e97aacb752efe2819f7a82f015d081dac6abfa0408ed8c41a"
},
"downloads": -1,
"filename": "pycgettb-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "9f4740636d4acc56062392654d8fdfae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 85533,
"upload_time": "2017-12-09T06:59:15",
"url": "https://files.pythonhosted.org/packages/d8/95/4e40a2af57a83aff7a6517114e59137f1bb1770f51d97abb3307a905fdf6/pycgettb-0.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ce783936719cd677d0f5fecc7fcf7cac",
"sha256": "48e7dc1006372fb632a4ade68e273619d2b3f22c082e02312d023b8097b332f5"
},
"downloads": -1,
"filename": "pycgettb-0.1.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ce783936719cd677d0f5fecc7fcf7cac",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 9457,
"upload_time": "2017-12-09T06:59:14",
"url": "https://files.pythonhosted.org/packages/5a/af/f8784e9ba4508f18fae6c0dae72b442ad7f05793ca2990a47c859d57940c/pycgettb-0.1.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9f4740636d4acc56062392654d8fdfae",
"sha256": "1c9ed848c1e9650e97aacb752efe2819f7a82f015d081dac6abfa0408ed8c41a"
},
"downloads": -1,
"filename": "pycgettb-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "9f4740636d4acc56062392654d8fdfae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 85533,
"upload_time": "2017-12-09T06:59:15",
"url": "https://files.pythonhosted.org/packages/d8/95/4e40a2af57a83aff7a6517114e59137f1bb1770f51d97abb3307a905fdf6/pycgettb-0.1.2.tar.gz"
}
]
}