diff --git a/Makefile b/Makefile index c89504f..41c3195 100644 --- a/Makefile +++ b/Makefile @@ -155,6 +155,31 @@ clean: ############## https://pypi.org/... +TAB=tabxlsx.tmp +xlsx tabxlsx: + test ! -d $(TAB) || rm -rf $(TAB) + mkdir -v $(TAB) + $(MAKE) $(TAB)/setup.py + cd $(TAB) && $(PYTHON3) setup.py sdist + cd $(TAB) && $(TWINE) check dist/* + @echo "(cd $(TAB) && $(TWINE) upload dist/*)" +tabxlsx.tmp/setup.py: setup.tabxlsx.cfg tabxlsx.py tabxlsx.md tabxlsx.tests.py LICENSE Makefile + cp -v setup.tabxlsx.cfg $(dir $@)/setup.cfg + cp -v tabxlsx.py $(dir $@)/ + cp -v tabxlsx.md $(dir $@)/ + cp -v tabxlsx.tests.py $(dir $@)/ + cp -v LICENSE $(dir $@)/tabxlsx.txt + { echo '#!/usr/bin/env python3' \ + ; echo 'import setuptools' \ + ; echo 'setuptools.setup()' ; } > $@ + chmod +x $@ +insxlsx: + $(MAKE) $(TAB)/setup.py + cd $(TAB) && $(PYTHON3) -m pip install --no-compile --user . + $(MAKE) showxlsx +showxlsx: ; $(PYTHON3) -m pip show -f $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.tabxlsx.cfg) +unsxlsx: ; $(PYTHON3) -m pip uninstall -vv --yes $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.tabxlsx.cfg) + README: README.md Makefile cat README.md | sed -e "/\\/badge/d" -e /^---/q > README setup.py: Makefile @@ -180,8 +205,7 @@ ins install: $(PYTHON3) -m pip install --no-compile --user . rm -v setup.py $(MAKE) show | sed -e "s|[.][.]/[.][.]/[.][.]/bin|$$HOME/.local/bin|" -show: - python3 -m pip show -f $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.cfg) +show:; $(PYTHON3) -m pip show -f $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.cfg) uns uninstall: setup.py $(MAKE) setup.py $(PYTHON3) -m pip uninstall -v --yes $$(sed -e '/^name *=/!d' -e 's/.*= *//' setup.cfg) diff --git a/setup.tabxlsx.cfg b/setup.tabxlsx.cfg new file mode 100644 index 0000000..1c0b9e6 --- /dev/null +++ b/setup.tabxlsx.cfg @@ -0,0 +1,28 @@ +# __version__ + +[metadata] +name = tabxlsx +version = 1.0.3283 +license = APL +license_files = + tabxlsx.txt +author = Guido U. Draheim +author-email = Guido.Draheim@gmx.de +home-page = https://github.com/gdraheim/timetrack-odoo +description = tabXLSX reads and writes simple Excel xlsx files. It does not depend on other libraries. +long-description = file: tabxlsx.md +long-description-content-type = text/markdown +requires-dist = setuptools + +[options] +include_package_data=True +scripts = + tabxlsx.py + +[options.data_files] +data = + tabxlsx.txt + tabxlsx.md + +[bdist_wheel] +universal = 1 diff --git a/tabxlsx.md b/tabxlsx.md new file mode 100644 index 0000000..ab5c881 --- /dev/null +++ b/tabxlsx.md @@ -0,0 +1,10 @@ + +## TABXLSX - minimal Excel support + +TabXLSX reads and writes Excel xlsx files. It does not depend on other libraries.The output defaults to a markdown table and csv-like output +is available as well. This allows piping the data into other scripts. + +A number of output format options are available but less than the tabtotext.py module. The export to xlsx was orginally written with +openpyx1 for tabtotext but it is possible to write simple tables +just with Python's zip and xml.etree builtin modules. That is also +faster.