chore: auto-commit (97 archivos)
- .claude/CLAUDE.md - .claude/agents/fn-recopilador/SKILL.md - .claude/rules/INDEX.md - .claude/rules/cpp_apps.md - bash/functions/infra/build_cpp_windows.sh - cpp/CMakeLists.txt - cpp/PATTERNS.md - cpp/framework/app_base.cpp - cpp/framework/app_base.h - dev/issues/README.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
---
|
||||
name: keepass_dump
|
||||
kind: function
|
||||
lang: bash
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "keepass_dump() -> json"
|
||||
description: "Exporta toda la BD KeePassXC como array JSON. Una sola apertura del .kdbx via keepassxc-cli export -f xml + python3 etree para parsear. Cada elemento: {path,title,username,password,url,notes}."
|
||||
tags: [keepass, keepassxc, dump, export, batch]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: []
|
||||
params: []
|
||||
output: "array JSON de objetos {path,title,username,password,url,notes}"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "bash/functions/infra/keepass_dump.sh"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```bash
|
||||
source keepass_dump.sh
|
||||
data=$(keepass_dump)
|
||||
|
||||
# Filtrar por grupo
|
||||
echo "$data" | jq '.[] | select(.path | startswith("Servers/"))'
|
||||
|
||||
# Solo passwords no vacios
|
||||
echo "$data" | jq '.[] | select(.password != "")'
|
||||
|
||||
# Contar
|
||||
echo "$data" | jq 'length'
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
- KeePassXC 2.6.x export solo soporta `xml` y `csv` (no JSON nativo). Por eso pasamos por python3.
|
||||
- 2.7.0+ tiene `-f json` directo; este wrapper sigue funcionando.
|
||||
- Output ya descifrado (master password aplicada en export). El atributo `Protected="True"` del XML solo es marker.
|
||||
- El leading "Root" del KDBX se omite en `path`.
|
||||
Reference in New Issue
Block a user