: bharatvaj/lobasic-macros

LibreOffice macros I use often

1 
2 
3 
4 
5 
6 
7 
8 
9 
# Sondage Automation

This directory holds the extracted contents of `SondageAutomation.ods`. Basic source code is editable at `Basic/Standard/*.bas`; the other workbook files, including sheets, settings, styles, and the thumbnail, keep their original ZIP paths. The generated `.ods` is not tracked in the latest Git tree. Earlier Git commits preserve the 2024 `git-original` sources and the 2026-09-14 `my-original` workbook.

- `make pack` (or `python helper.py pack`) assembles the workbook, turning `.bas` files into Basic module XML inside the ZIP. It backs up an existing `SondageAutomation.ods` to `.ods.bak` before replacing it.
- `make unpack` (or `python helper.py unpack`) extracts edits made inside the workbook. **It overwrites the extracted source files**, so do not run it after editing `.bas` or other extracted files directly.
- `make clean` removes the generated workbook.

`helper.py` uses only Python's standard library. Test report macros using a disposable workbook and isolated input/export paths.