https://github.com/tiibun/py-xlsx-textconv
https://github.com/tiibun/py-xlsx-textconv
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tiibun/py-xlsx-textconv
- Owner: tiibun
- License: mit-0
- Created: 2021-04-23T02:41:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-26T04:38:33.000Z (almost 2 years ago)
- Last Synced: 2024-11-12T23:35:02.604Z (5 months ago)
- Language: Python
- Size: 329 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - tiibun/py-xlsx-textconv - (Python)
README
# py_xlsx_textconv
Excel to text covert tool for Git.
This is a python port of [git-xlsx-textconv](https://github.com/tokuhirom/git-xlsx-textconv)When git diff or git log -p, extract cell values in excel and format:
```
[SheetName1][TAB][A1][TAB][B1][TAB][C1][TAB]...
[SheetName1][TAB][A2][TAB][B2][TAB][C2][TAB]...
```and compare text formats.
Example: Excel
git diff
And experimental VBA support. (v0.0.4)
## This does not compare
- Style
- Auto Shapes
- ... and so on## Install
```
pip install py-xlsx-textconv
```## Configuration
If `~/.config/git/attributes` (Windows: %HOMEPATH%\.config\git\attributes) does not exist, you need to creat and edit it.
```:~/.config/git/attributes
.xlsx diff=xlsx
.xlsm diff=xlsx
```Or if you prefered per project attribute file, create `.gitattributes` file and edit it above
Append to `~/.gitconfig` (Windows: %HOMEPATH%\.gitconfig).
```:~/.gitconfig
[diff "xlsx"]
binary = true
textconv = PYTHONUTF8=1 py-xlsx-textconv
```If you would like to compare values only, append `-d` option.
```:~/.gitconfig
[diff "xlsx"]
binary = true
textconv = PYTHONUTF8=1 py-xlsx-textconv -d
```## Development
Install [pdm](https://pdm.fming.dev/latest/).
```
# install dependencies
pdm sync -d# test
pdm run test
```## LICENSE
MIT