semvec/pypi-packages huggingface dataset:
ec-tools-cli 0.1.2
A collection of tool cli for EC.
License: MIT
Requires Python: >=3.12

# ec-tools-cli

A small set of CLI tools for encryption, vault storage, backups, DB queries, auto-run, and QR codes.

## Install
```bash
pip install -r requirements.txt
pip install -e .
```

## Commands
- `ec-enc` — encrypt/decrypt files (AES-256-CBC).
- `ec-sql` — SQLite REPL.
- `ec-vault` — encrypted key/value vault.
- `ec-backup` — chunked encrypted backup + restore.
- `auto-run` — run `.py`, compile+run `.c/.cpp`.
- `ec-qrcode` — generate/scan QR codes.

## Usage

### `ec-enc`
```bash
# encrypt
ec-enc -e input.bin -o output.enc -p <password>

# decrypt
ec-enc -d output.enc -o output.bin -p <password>
```

### `ec-sql`
```bash
ec-sql -db /path/to/file.db
```
- Prints tables, then interactive SQL (`exit` to quit).

### `ec-vault`
```bash
# list keys
ec-vault list

# insert (value, file, or stdin)
ec-vault insert -p <password> -k <key> -v <value>
ec-vault insert -p <password> -k <key> -f /path/to/file

echo "secret" | ec-vault insert -p <password> -k <key>

# get (stdout or file)
ec-vault get -p <password> -k <key>
ec-vault get -p <password> -k <key> -o /path/to/output

# delete
ec-vault delete -k <key>
```
- Default DB: `~/.ec_tools/ec_tools.db`.

### `ec-backup`
```bash
# backup
ec-backup -c config.json -p <password> backup

# restore
ec-backup -c config.json -p <password> unpack -o /path/to/output
```
Minimal config:
```json
{
  "db_path": "/path/to/index.db",
  "src_path": "/path/to/source",
  "zip_path": "/path/to/archives"
}
```
Notes:
- Backs up by file hash/mtime/size; only changed files are packed.
- Files are encrypted in chunks and stored inside zipped packages.

### `auto-run`
```bash
auto-run path/to/file.py
auto-run path/to/file.cpp
```
- C/C++: compile with `g++ -O2 -Wall -std=c++17`, then run.
- If `<name>.in` and `<name>.txt` exist, it diffs output vs expected.

### `ec-qrcode`
```bash
# generate
ec-qrcode generate -m "hello" -s 20 -o out.png

# scan
ec-qrcode scan -i in.png -o decoded.txt
```

## One-off scripts
```bash
python -m ec_tools_cli.one_off.migrate_db -c config.json
```
- Migrates backup DB records to use relative zip paths.
pox-convert 1.1.0
Convert PO files to Excel Spreadsheets and back.
License: MIT
Requires Python: >=3.11
Keywords: excel, gettext, i18n, l10n, po, translation, xlsx

# pox-convert

[![PyPI](https://img.shields.io/pypi/v/pox-convert)](https://pypi.org/project/pox-convert/)
[![Python](https://img.shields.io/pypi/pyversions/pox-convert)](https://pypi.org/project/pox-convert/)
[![License](https://img.shields.io/pypi/l/pox-convert)](https://github.com/bartTC/pox/blob/main/LICENSE)
[![Tests](https://github.com/bartTC/pox/actions/workflows/tests.yml/badge.svg)](https://github.com/bartTC/pox/actions/workflows/tests.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bartTC/dfcb5e7cd6cb674ffff8e86f45fb621f/raw/coverage.json)](https://github.com/bartTC/pox/actions/workflows/tests.yml)

Convert `.po` (gettext) files to Excel spreadsheets and back. Supports fuzzy entries and multiple plural forms.

![Screenshot](https://github.com/bartTC/pox/raw/main/screenshot.png)

## Usage

### PO to Excel

```bash
uvx pox-convert export path/to/messages.po
```

Use globbing to convert multiple files at once:

```bash
uvx pox-convert export locales/**/django.po
```

Options:

```
-o, --outdir      Output directory (default: current directory)
-f, --filename    Filename template using {lang} and {date} variables
                  (default: translations_{lang}.xlsx)
-l, --language    Override the language metadata from the PO file
--fuzzy           How to handle fuzzy entries: stop, ignore, include (default: stop)
```

### Excel to PO

```bash
uvx pox-convert import path/to/translations.xlsx
```

Options:

```
-o, --outdir      Output directory (default: current directory)
-f, --filename    Filename template using {lang} variable (default: {lang}.po)
```

## Spreadsheet format

The generated Excel file has the following structure:

| id | Context   | Singular Form | Translation |
|----|-----------|---------------|-------------|
| 1  |           | Hello         | Hallo       |
| 2  | adjective | Open          | Offen       |
| 3  |           | Goodbye       |             |

- Empty translations are highlighted in yellow with a black border
- The header row is frozen for easy scrolling
- Alternating row stripes improve readability
- Plural forms get additional translation columns
- Language metadata is stored as a custom document property

## Django integration

pox-convert ships with a Django management command that wraps
`makemessages` to skip fuzzy matching:

```bash
python manage.py makemessages_nofuzzy -l de
```

Add `pox.contrib.django.pox` to your `INSTALLED_APPS` to use it.

# Changelog

## 1.1.0

- Programmatic plural hint generation using a safe formula parser.
- Improved CI coverage reporting.
- 100% test coverage.

## 1.0.1

- Unified CLI with `pox-convert` entry point.
- Added Excel-to-PO reverse conversion (`xop`).
- Redesigned spreadsheet styles and column headers.
- Added MIT license, README, and GitHub Actions CI workflow.
- Full type annotations and stricter linting.

## 1.0.0

- Initial release with PO-to-Excel conversion.