--- title: Brand Asset Management Tools emoji: 🔧 colorFrom: blue colorTo: green sdk: streamlit sdk_version: 1.32.2 app_file: app.py pinned: false license: mit python_version: 3.12 --- # 🔧 Brand Asset Management Tools A comprehensive suite of tools for managing and processing brand assets, built with Streamlit. ## Features This application provides 8 tools for brand asset management: 1. **Extract Images from Excel** - Extract embedded images from Excel worksheets (.xlsx files) 2. **Name Assets by Brand** - Rename files based on brand naming conventions 3. **Canvas White to Transparent** - Convert white backgrounds to transparent in images 4. **Asset Overview** - Generate PDF overview of your assets 5. **Name Stims by Block** - Organize and rename stimulus files by block with output file creation 6. **Re-run Matrix** - Re-process updated zip files and regenerate reports 7. **Resize** - Resize images while maintaining aspect ratio on transparent canvas 8. **Place on Canvas** - Center images on a custom canvas size ## Usage Simply select the tool you need from the tabs at the top of the application and follow the instructions for each tool. ### Extract Images from Excel - Upload one or more Excel files (.xlsx) - Select specific worksheets or all worksheets - Download extracted images as a ZIP file ### Name Assets by Brand - Upload images and specify brand naming patterns - Batch rename files according to your conventions ### Canvas White to Transparent - Convert white backgrounds in images to transparent - Useful for logo and asset preparation ### Asset Overview - Generate comprehensive PDF reports of your asset collections ### Name Stims by Block - Organize stimulus files by experimental blocks - Create structured output files ### Re-run Matrix - Upload a modified zip from "Name Stims by Block" - Re-analyze files and regenerate PDF/Excel reports ### Resize - Resize images to specific dimensions - Maintain transparent backgrounds ### Place on Canvas - Center images on custom canvas sizes - Perfect for creating consistent asset formats ## Requirements - Python 3.12 - Streamlit 1.32.2 - OpenCV (headless) - Pillow - ReportLab - Pandas - openpyxl - xlrd See [requirements.txt](requirements.txt) for complete dependencies. ## Local Development To run this application locally: ```bash pip install -r requirements.txt streamlit run app.py ``` ## Verification Before pushing changes, run the structural validator: ```bash python scripts/repo_validate.py ``` It performs a `py_compile` sweep over every tracked `*.py`, verifies `requirements.txt` is parseable, and checks the README HF Spaces frontmatter. The same script runs on every PR via `.github/workflows/repo_validate.yml`. Ruff lint over changed Python runs separately via `.github/workflows/gate.yml`. ## Branch & Deploy `main` is the development base AND the production deploy branch — every push to `main` triggers `.github/workflows/main.yml`, which redeploys the Hugging Face Space at `https://huggingface.co/spaces/DecodeMarketing/decode_tools`. There is no staging step. For the full rules — what is "deploy-affecting", the post-merge continuity check, branch naming, PR template — see: - [`docs/guides/protected-boundary-policy.md`](docs/guides/protected-boundary-policy.md) — what `main` protects and how to touch it safely - [`docs/guides/git-and-pr-rules.md`](docs/guides/git-and-pr-rules.md) — branch model, observed branches, PR target - [`docs/guides/review-workflow.md`](docs/guides/review-workflow.md) — reviewer subagent contract - [`.github/pull_request_template.md`](.github/pull_request_template.md) — PR checklist ## Architecture `app.py` wires 8 tabs (`tab1.py`–`tab8.py`) into a single Streamlit page; all tabs share utilities from `helper.py`. For the topology map and the helper consumer table, see: - [`docs/architecture/repository-erd.md`](docs/architecture/repository-erd.md) — runtime topology, file map, deploy pipe - [`docs/architecture/active-surface.md`](docs/architecture/active-surface.md) — `helper.py` exports and which tab consumes what For the full doc tree: [`docs/INDEX.md`](docs/INDEX.md). For AI-contributor context: [`AGENTS.md`](AGENTS.md) and [`CLAUDE.md`](CLAUDE.md).