{
"name": "doxx",
"version": "0.1.4",
"summary": "doxx: shows Word documents (.docx) in the terminal, with tables and outlines, and exports them as text, Markdown, CSV or JSON (Rust)",
"category": "tool",
"license": "MIT",
"homepage": "https://github.com/bgreenwell/doxx",
"source": {
"url": "https://github.com/bgreenwell/doxx/archive/refs/tags/v0.1.4.tar.gz",
"sha256": "72af676ca30b27adc7a13b17a48aac88589c940accba28453f3d94a861bed961"
},
"watch": {"kind": "github-release", "repo": "bgreenwell/doxx", "tag_regex": "^v([0-9]+\\.[0-9]+\\.[0-9]+)$", "revendor": {"tool": "cargo", "lockfile": "Cargo.lock"}},
"vendor": "vendor.txt",
"deps": [],
"env_packages": [],
"static": true,
"nss": true,
"check": "bin/doxx --version | has -x 'doxx 0.1.4' && t=$(mktemp -d) && printf '%s\\n' 'import sys, zipfile' 'W = '\\''xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"'\\''' 'H = '\\'''\\''' 'ct = (H + '\\'''\\''' ' '\\'''\\''' ' '\\'''\\''' ' '\\'''\\''' ' '\\'''\\''' ' '\\'''\\''' ' '\\'''\\'')' 'rels = (H + '\\'''\\''' ' '\\'''\\''' ' '\\'''\\''' ' '\\'''\\'')' 'drels = (H + '\\'''\\''' ' '\\'''\\'')' 'styles = (H + '\\'''\\''' ' '\\'''\\'' % W)' 'core = (H + '\\''BVS doc'\\'')' 'app = (H + '\\''bvs'\\'')' 'cell = lambda s: '\\''%s'\\'' % s' 'doc = (H + '\\'''\\'' % W' ' + '\\''BVS heading'\\''' ' + '\\''A bvs paragraph of text.'\\''' ' + '\\'''\\'' + cell('\\''name'\\'') + cell('\\''size'\\'') + '\\'''\\'' + cell('\\''alpha'\\'') + cell('\\''1'\\'') + '\\'''\\'' + cell('\\''beta'\\'') + cell('\\''22'\\'') + '\\'''\\''' ' + '\\'''\\'')' 'with zipfile.ZipFile(sys.argv[1], \"w\", zipfile.ZIP_DEFLATED) as z:' ' for n, s in ((\"[Content_Types].xml\", ct), (\"_rels/.rels\", rels), (\"word/_rels/document.xml.rels\", drels),' ' (\"word/document.xml\", doc), (\"word/styles.xml\", styles), (\"docProps/core.xml\", core), (\"docProps/app.xml\", app)):' ' z.writestr(n, s)' > \"$t/mk.py\" && python3 \"$t/mk.py\" \"$t/f.docx\" && HOME=$t bin/doxx \"$t/f.docx\" --export text < /dev/null > \"$t/txt\" && has -x '# BVS heading' < \"$t/txt\" && has -x 'A bvs paragraph of text.' < \"$t/txt\" && HOME=$t bin/doxx \"$t/f.docx\" --export markdown < /dev/null | has -x '| name | size |' && [ \"$(HOME=$t bin/doxx \"$t/f.docx\" --export csv < /dev/null | sed -n '/^name,size$/,$p')\" = \"$(printf 'name,size\\nalpha,1\\nbeta,22')\" ] && HOME=$t bin/doxx \"$t/f.docx\" --export json < /dev/null > \"$t/json\" && python3 -c 'import json, sys; e = json.load(open(sys.argv[1]))[\"elements\"][0][\"Heading\"]; sys.exit(not (e[\"level\"] == 1 and e[\"text\"] == \"BVS heading\"))' \"$t/json\" && HOME=$t tui_screen 3 bin/doxx \"$t/f.docx\" > \"$t/screen\" && has 'BVS heading' < \"$t/screen\" && has beta < \"$t/screen\" && echo 'doxx 0.1.4: a Word document of a heading, a paragraph and a table exported as text, Markdown, CSV and JSON, and drawn in a pseudo-terminal'"
}