@jhm1909/ag-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ARCHITECTURE.md +189 -0
- package/.agent/known-registries.json +181 -0
- package/.agent/mcp_config.json +19 -0
- package/.agent/rules/clean-code.md +107 -0
- package/.agent/rules/documents.md +177 -0
- package/.agent/rules/git-workflow.md +68 -0
- package/.agent/rules/nano-banana.md +46 -0
- package/.agent/rules/research.md +35 -0
- package/.agent/rules/skill-loading.md +100 -0
- package/.agent/rules/skill-suggestion.md +47 -0
- package/.agent/rules/testing.md +52 -0
- package/.agent/rules/workflow-advisor.md +108 -0
- package/.agent/rules/workflow-skill-convention.md +127 -0
- package/.agent/skills/ai-engineer/SKILL.md +824 -0
- package/.agent/skills/ai-engineer/references/agentic-patterns.md +329 -0
- package/.agent/skills/ai-engineer/references/evaluation.md +493 -0
- package/.agent/skills/ai-engineer/references/llm.md +490 -0
- package/.agent/skills/ai-engineer/references/rag-advanced.md +444 -0
- package/.agent/skills/ai-engineer/references/serving-optimization.md +531 -0
- package/.agent/skills/ai-engineer/vector-db/README.md +137 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +41 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/backend-developer/SKILL.md +763 -0
- package/.agent/skills/backend-developer/references/general-patterns.md +65 -0
- package/.agent/skills/backend-developer/references/go-echo.md +68 -0
- package/.agent/skills/backend-developer/references/go-gin.md +76 -0
- package/.agent/skills/backend-developer/references/java-springboot.md +83 -0
- package/.agent/skills/backend-developer/references/node-express.md +64 -0
- package/.agent/skills/backend-developer/references/node-nestjs.md +69 -0
- package/.agent/skills/backend-developer/references/python-django.md +67 -0
- package/.agent/skills/backend-developer/references/python-fastapi.md +80 -0
- package/.agent/skills/blockchain-engineer/SKILL.md +975 -0
- package/.agent/skills/blockchain-engineer/references/deployment.md +28 -0
- package/.agent/skills/blockchain-engineer/references/evm.md +14 -0
- package/.agent/skills/blockchain-engineer/references/mechanisms.md +32 -0
- package/.agent/skills/blockchain-engineer/references/solidity.md +32 -0
- package/.agent/skills/business-analysis/SKILL.md +85 -0
- package/.agent/skills/business-analysis/references/best-practices/diagrams.md +141 -0
- package/.agent/skills/business-analysis/references/domains/ai-agent.md +94 -0
- package/.agent/skills/business-analysis/references/domains/blockchain-dapp.md +86 -0
- package/.agent/skills/business-analysis/references/domains/ecommerce.md +77 -0
- package/.agent/skills/business-analysis/references/domains/education.md +42 -0
- package/.agent/skills/business-analysis/references/domains/fintech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/fnb.md +82 -0
- package/.agent/skills/business-analysis/references/domains/healthtech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/internal-tools.md +38 -0
- package/.agent/skills/business-analysis/references/domains/marketplace.md +52 -0
- package/.agent/skills/business-analysis/references/domains/saas.md +36 -0
- package/.agent/skills/business-analysis/references/workflows/collaboration.md +41 -0
- package/.agent/skills/business-analysis/scripts/verify_mermaid.py +86 -0
- package/.agent/skills/business-analysis/templates/brd.md +46 -0
- package/.agent/skills/business-analysis/templates/change-request.md +41 -0
- package/.agent/skills/business-analysis/templates/prd-functional.md +38 -0
- package/.agent/skills/business-analysis/templates/use-case.md +40 -0
- package/.agent/skills/business-analysis/templates/user-story-detailed.md +36 -0
- package/.agent/skills/code-review/SKILL.md +113 -0
- package/.agent/skills/code-review/references/code-review-reception.md +209 -0
- package/.agent/skills/code-review/references/differential_review.md +59 -0
- package/.agent/skills/code-review/references/requesting-code-review.md +105 -0
- package/.agent/skills/code-review/references/spec_compliance.md +43 -0
- package/.agent/skills/code-review/references/verification-before-completion.md +139 -0
- package/.agent/skills/context-engineering/SKILL.md +68 -0
- package/.agent/skills/context-engineering/references/context-compression.md +84 -0
- package/.agent/skills/context-engineering/references/context-degradation.md +93 -0
- package/.agent/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/.agent/skills/context-engineering/references/context-optimization.md +82 -0
- package/.agent/skills/context-engineering/references/evaluation.md +89 -0
- package/.agent/skills/context-engineering/references/memory-systems.md +88 -0
- package/.agent/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/.agent/skills/context-engineering/references/project-development.md +97 -0
- package/.agent/skills/context-engineering/references/tool-design.md +86 -0
- package/.agent/skills/debugging/SKILL.md +60 -0
- package/.agent/skills/debugging/references/defense-in-depth.md +130 -0
- package/.agent/skills/debugging/references/root-cause-tracing.md +177 -0
- package/.agent/skills/debugging/references/systematic-debugging.md +295 -0
- package/.agent/skills/debugging/references/verification-before-completion.md +142 -0
- package/.agent/skills/designer/SKILL.md +159 -0
- package/.agent/skills/designer/concepts/apple-glass.md +48 -0
- package/.agent/skills/designer/concepts/aurora-gradients.md +26 -0
- package/.agent/skills/designer/concepts/bento-grids.md +14 -0
- package/.agent/skills/designer/concepts/claymorphism.md +27 -0
- package/.agent/skills/designer/concepts/neo-brutalism.md +32 -0
- package/.agent/skills/designer/data/app-interface.csv +31 -0
- package/.agent/skills/designer/data/charts.csv +26 -0
- package/.agent/skills/designer/data/colors.csv +162 -0
- package/.agent/skills/designer/data/design.csv +1776 -0
- package/.agent/skills/designer/data/icons.csv +106 -0
- package/.agent/skills/designer/data/landing.csv +35 -0
- package/.agent/skills/designer/data/products.csv +162 -0
- package/.agent/skills/designer/data/react-performance.csv +45 -0
- package/.agent/skills/designer/data/styles.csv +85 -0
- package/.agent/skills/designer/data/typography.csv +74 -0
- package/.agent/skills/designer/data/ui-reasoning.csv +162 -0
- package/.agent/skills/designer/data/ux-guidelines.csv +100 -0
- package/.agent/skills/designer/references/accessibility.md +172 -0
- package/.agent/skills/designer/references/branding.md +88 -0
- package/.agent/skills/designer/references/color-theory.md +139 -0
- package/.agent/skills/designer/references/creation.md +118 -0
- package/.agent/skills/designer/references/design-systems.md +219 -0
- package/.agent/skills/designer/references/frontend_design_aesthetics.md +57 -0
- package/.agent/skills/designer/references/layout.md +200 -0
- package/.agent/skills/designer/references/motion.md +92 -0
- package/.agent/skills/designer/references/review.md +100 -0
- package/.agent/skills/designer/references/trends.md +209 -0
- package/.agent/skills/designer/references/typography.md +190 -0
- package/.agent/skills/designer/scripts/remove_background.py +135 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/core.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/core.py +217 -0
- package/.agent/skills/designer/scripts/ui-search/design_system.py +1067 -0
- package/.agent/skills/designer/scripts/ui-search/search.py +114 -0
- package/.agent/skills/designer/templates/design-motion-spec.md +30 -0
- package/.agent/skills/devops-engineer/SKILL.md +90 -0
- package/.agent/skills/devops-engineer/docker-compose/README.md +47 -0
- package/.agent/skills/devops-engineer/references/ci-cd-pipelines.md +76 -0
- package/.agent/skills/devops-engineer/references/cloud-providers.md +57 -0
- package/.agent/skills/devops-engineer/references/codebase-normalization.md +104 -0
- package/.agent/skills/devops-engineer/references/container-orchestration.md +69 -0
- package/.agent/skills/devops-engineer/references/iac-tools.md +63 -0
- package/.agent/skills/devops-engineer/references/observability-security.md +45 -0
- package/.agent/skills/devops-engineer/references/vercel-supabase.md +17 -0
- package/.agent/skills/devops-engineer/templates/release-notes.md +8 -0
- package/.agent/skills/frontend-developer/SKILL.md +125 -0
- package/.agent/skills/frontend-developer/react-nextjs/README.md +90 -0
- package/.agent/skills/frontend-developer/references/angular.md +52 -0
- package/.agent/skills/frontend-developer/references/composition_patterns.md +60 -0
- package/.agent/skills/frontend-developer/references/core-performance.md +68 -0
- package/.agent/skills/frontend-developer/references/modern-signals.md +43 -0
- package/.agent/skills/frontend-developer/references/react_performance_rules.md +55 -0
- package/.agent/skills/frontend-developer/references/vue-nuxt.md +55 -0
- package/.agent/skills/frontend-developer/scripts/validate_compliance.py +65 -0
- package/.agent/skills/frontend-developer/threejs/README.md +89 -0
- package/.agent/skills/frontend-developer/threejs/animation.md +552 -0
- package/.agent/skills/frontend-developer/threejs/fundamentals.md +488 -0
- package/.agent/skills/frontend-developer/threejs/geometry.md +548 -0
- package/.agent/skills/frontend-developer/threejs/interaction.md +660 -0
- package/.agent/skills/frontend-developer/threejs/lighting.md +481 -0
- package/.agent/skills/frontend-developer/threejs/loaders.md +623 -0
- package/.agent/skills/frontend-developer/threejs/materials.md +520 -0
- package/.agent/skills/frontend-developer/threejs/postprocessing.md +602 -0
- package/.agent/skills/frontend-developer/threejs/router.json +181 -0
- package/.agent/skills/frontend-developer/threejs/shaders.md +642 -0
- package/.agent/skills/frontend-developer/threejs/textures.md +628 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/lead-architect/SKILL.md +85 -0
- package/.agent/skills/lead-architect/references/application-architecture.md +70 -0
- package/.agent/skills/lead-architect/references/infrastructure.md +51 -0
- package/.agent/skills/lead-architect/references/process.md +42 -0
- package/.agent/skills/lead-architect/references/system-architecture.md +62 -0
- package/.agent/skills/lead-architect/references/web-fullstack.md +82 -0
- package/.agent/skills/lead-architect/templates/adr.md +62 -0
- package/.agent/skills/lead-architect/templates/rfc.md +46 -0
- package/.agent/skills/lead-architect/templates/sdd.md +62 -0
- package/.agent/skills/lead-architect/templates/technical-spec.md +61 -0
- package/.agent/skills/marketer/SKILL.md +66 -0
- package/.agent/skills/marketer/remotion-best-practices/SKILL.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/3d.md +86 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/animations.md +29 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets.md +78 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/audio.md +172 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/can-decode.md +75 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/charts.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/compositions.md +146 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/display-captions.md +126 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/extract-frames.md +229 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/fonts.md +152 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/gifs.md +138 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/images.md +130 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/lottie.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-text.md +143 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/sequencing.md +106 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/tailwind.md +11 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/text-animations.md +20 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/timing.md +179 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transitions.md +122 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/trimming.md +53 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/videos.md +171 -0
- package/.agent/skills/mcp-builder/SKILL.md +76 -0
- package/.agent/skills/mcp-builder/references/evaluation.md +602 -0
- package/.agent/skills/mcp-builder/references/mcp_best_practices.md +249 -0
- package/.agent/skills/mcp-builder/references/node_mcp_server.md +970 -0
- package/.agent/skills/mcp-builder/references/python_mcp_server.md +719 -0
- package/.agent/skills/mobile-developer/SKILL.md +83 -0
- package/.agent/skills/mobile-developer/api-routes/SKILL.md +389 -0
- package/.agent/skills/mobile-developer/building-ui/SKILL.md +335 -0
- package/.agent/skills/mobile-developer/building-ui/references/animations.md +220 -0
- package/.agent/skills/mobile-developer/building-ui/references/controls.md +270 -0
- package/.agent/skills/mobile-developer/building-ui/references/form-sheet.md +227 -0
- package/.agent/skills/mobile-developer/building-ui/references/gradients.md +106 -0
- package/.agent/skills/mobile-developer/building-ui/references/icons.md +213 -0
- package/.agent/skills/mobile-developer/building-ui/references/media.md +198 -0
- package/.agent/skills/mobile-developer/building-ui/references/route-structure.md +229 -0
- package/.agent/skills/mobile-developer/building-ui/references/search.md +248 -0
- package/.agent/skills/mobile-developer/building-ui/references/storage.md +121 -0
- package/.agent/skills/mobile-developer/building-ui/references/tabs.md +368 -0
- package/.agent/skills/mobile-developer/building-ui/references/visual-effects.md +197 -0
- package/.agent/skills/mobile-developer/building-ui/references/webgpu-three.md +605 -0
- package/.agent/skills/mobile-developer/cicd-workflows/SKILL.md +107 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/fetch.js +109 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/package.json +11 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/validate.js +84 -0
- package/.agent/skills/mobile-developer/data-fetching/SKILL.md +508 -0
- package/.agent/skills/mobile-developer/deployment/SKILL.md +207 -0
- package/.agent/skills/mobile-developer/deployment/references/app-store-metadata.md +479 -0
- package/.agent/skills/mobile-developer/deployment/references/ios-app-store.md +355 -0
- package/.agent/skills/mobile-developer/deployment/references/play-store.md +246 -0
- package/.agent/skills/mobile-developer/deployment/references/testflight.md +58 -0
- package/.agent/skills/mobile-developer/deployment/references/workflows.md +200 -0
- package/.agent/skills/mobile-developer/dev-client/SKILL.md +181 -0
- package/.agent/skills/mobile-developer/tailwind-setup/SKILL.md +501 -0
- package/.agent/skills/mobile-developer/upgrading-expo/SKILL.md +116 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/new-architecture.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-19.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-compiler.md +59 -0
- package/.agent/skills/mobile-developer/use-dom/SKILL.md +434 -0
- package/.agent/skills/modern-python/SKILL.md +122 -0
- package/.agent/skills/project-manager/SKILL.md +110 -0
- package/.agent/skills/project-manager/references/ba-collaboration.md +62 -0
- package/.agent/skills/project-manager/references/discovery_process.md +52 -0
- package/.agent/skills/project-manager/references/jobs_to_be_done.md +51 -0
- package/.agent/skills/project-manager/references/prd_development.md +52 -0
- package/.agent/skills/project-manager/references/rules-guide.md +55 -0
- package/.agent/skills/project-manager/references/skill-creation.md +98 -0
- package/.agent/skills/project-manager/references/strategic-frameworks.md +62 -0
- package/.agent/skills/project-manager/references/task-decomposition.md +194 -0
- package/.agent/skills/project-manager/references/workflows-guide.md +44 -0
- package/.agent/skills/project-manager/router.json +160 -0
- package/.agent/skills/project-manager/scripts/compare_skill.py +177 -0
- package/.agent/skills/project-manager/scripts/encoding_utils.py +36 -0
- package/.agent/skills/project-manager/scripts/init_skill.py +190 -0
- package/.agent/skills/project-manager/scripts/quick_validate.py +123 -0
- package/.agent/skills/project-manager/templates/pm-strategy-one-pager.md +6 -0
- package/.agent/skills/project-manager/templates/prd-strategic.md +38 -0
- package/.agent/skills/project-manager/templates/skill-questionnaire.md +118 -0
- package/.agent/skills/project-manager/templates/user-story-simple.md +14 -0
- package/.agent/skills/prompt-engineer/SKILL.md +319 -0
- package/.agent/skills/prompt-engineer/skill-creator/README.md +47 -0
- package/.agent/skills/qa-tester/SKILL.md +142 -0
- package/.agent/skills/qa-tester/assets/README.md +8 -0
- package/.agent/skills/qa-tester/references/accessibility_testing.md +35 -0
- package/.agent/skills/qa-tester/references/agent_browser.md +38 -0
- package/.agent/skills/qa-tester/references/automation/api_testing.md +23 -0
- package/.agent/skills/qa-tester/references/automation/best_practices.md +14 -0
- package/.agent/skills/qa-tester/references/automation/jest_vitest.md +26 -0
- package/.agent/skills/qa-tester/references/automation/playwright.md +30 -0
- package/.agent/skills/qa-tester/references/e2e_testing.md +46 -0
- package/.agent/skills/qa-tester/references/integration_testing.md +39 -0
- package/.agent/skills/qa-tester/references/performance_testing.md +44 -0
- package/.agent/skills/qa-tester/references/property_based_testing.md +44 -0
- package/.agent/skills/qa-tester/references/security_audit.md +53 -0
- package/.agent/skills/qa-tester/references/security_testing.md +30 -0
- package/.agent/skills/qa-tester/references/sharp_edges.md +49 -0
- package/.agent/skills/qa-tester/references/static_analysis.md +52 -0
- package/.agent/skills/qa-tester/references/supply_chain_audit.md +54 -0
- package/.agent/skills/qa-tester/references/test_case_standards.md +96 -0
- package/.agent/skills/qa-tester/references/test_report_template.md +32 -0
- package/.agent/skills/qa-tester/references/unit_testing.md +50 -0
- package/.agent/skills/qa-tester/references/visual_testing.md +32 -0
- package/.agent/skills/qa-tester/templates/uat-plan.md +34 -0
- package/.agent/skills/research-first/SKILL.md +118 -0
- package/.agent/skills-manifest.json +264 -0
- package/.agent/workflows/absorb.md +176 -0
- package/.agent/workflows/bootstrap.md +91 -0
- package/.agent/workflows/brainstorm.md +168 -0
- package/.agent/workflows/break-tasks.md +77 -0
- package/.agent/workflows/commit.md +349 -0
- package/.agent/workflows/custom-behavior.md +64 -0
- package/.agent/workflows/debug.md +65 -0
- package/.agent/workflows/development.md +49 -0
- package/.agent/workflows/documentation.md +221 -0
- package/.agent/workflows/gen-tests.md +53 -0
- package/.agent/workflows/guide.md +196 -0
- package/.agent/workflows/implement-feature.md +182 -0
- package/.agent/workflows/install-skill.md +193 -0
- package/.agent/workflows/qa.md +54 -0
- package/.agent/workflows/ui-ux-design.md +108 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/cli/index.js +345 -0
- package/cli/migrate-skills.js +113 -0
- package/cli/verify.js +291 -0
- package/package.json +49 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# UI/UX Trends & Research
|
|
2
|
+
|
|
3
|
+
Current design trends and emerging patterns (2024-2025).
|
|
4
|
+
|
|
5
|
+
## Major Trends
|
|
6
|
+
|
|
7
|
+
### 1. Liquid Glass / Glassmorphism 2.0
|
|
8
|
+
|
|
9
|
+
**What**: Translucent surfaces with subtle blur and layering.
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
.glass-card {
|
|
13
|
+
background: rgba(255, 255, 255, 0.1);
|
|
14
|
+
backdrop-filter: blur(20px) saturate(180%);
|
|
15
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
16
|
+
border-radius: 16px;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**When to use**: Overlay content, floating panels, premium aesthetics.
|
|
21
|
+
**Watch out**: Performance on mobile, contrast issues.
|
|
22
|
+
|
|
23
|
+
### 2. AI-Integrated Design
|
|
24
|
+
|
|
25
|
+
**Patterns**:
|
|
26
|
+
|
|
27
|
+
- Contextual suggestions inline
|
|
28
|
+
- Generative content placeholders
|
|
29
|
+
- Adaptive interfaces based on behavior
|
|
30
|
+
- Natural language inputs alongside traditional forms
|
|
31
|
+
|
|
32
|
+
**Implementation tips**:
|
|
33
|
+
|
|
34
|
+
- Show AI confidence levels
|
|
35
|
+
- Always allow manual override
|
|
36
|
+
- Transparent about AI-generated content
|
|
37
|
+
|
|
38
|
+
### 3. Bento Grid Layouts
|
|
39
|
+
|
|
40
|
+
**What**: Asymmetric grid with varying cell sizes, inspired by Japanese bento boxes.
|
|
41
|
+
|
|
42
|
+
```css
|
|
43
|
+
.bento {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: repeat(4, 1fr);
|
|
46
|
+
grid-template-rows: repeat(3, 200px);
|
|
47
|
+
gap: 16px;
|
|
48
|
+
}
|
|
49
|
+
.bento-large {
|
|
50
|
+
grid-column: span 2;
|
|
51
|
+
grid-row: span 2;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**When to use**: Dashboards, portfolios, feature showcases.
|
|
56
|
+
|
|
57
|
+
### 4. Beyond Flat Design
|
|
58
|
+
|
|
59
|
+
**Evolution**: Adding depth back without going full skeuomorphic.
|
|
60
|
+
|
|
61
|
+
- Subtle shadows with purpose
|
|
62
|
+
- 3D elements for emphasis
|
|
63
|
+
- Layered paper-like surfaces
|
|
64
|
+
- Micro-gradients for polish
|
|
65
|
+
|
|
66
|
+
### 5. Bold Typography as Hero
|
|
67
|
+
|
|
68
|
+
**Patterns**:
|
|
69
|
+
|
|
70
|
+
- Oversized headlines (100px+)
|
|
71
|
+
- Mixed weight in single headlines
|
|
72
|
+
- Kinetic typography (scroll-triggered)
|
|
73
|
+
- Variable fonts for dynamic weight
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
.hero-text {
|
|
77
|
+
font-size: clamp(3rem, 10vw, 8rem);
|
|
78
|
+
font-weight: 900;
|
|
79
|
+
line-height: 0.9;
|
|
80
|
+
letter-spacing: -0.02em;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 6. Sustainable/Ethical UX
|
|
85
|
+
|
|
86
|
+
**Principles**:
|
|
87
|
+
|
|
88
|
+
- Low-energy UI (fewer animations, efficient code)
|
|
89
|
+
- Dark mode by default (saves OLED energy)
|
|
90
|
+
- Reduced data transfer (optimized images)
|
|
91
|
+
- Honest patterns (no dark patterns)
|
|
92
|
+
- Privacy-first defaults
|
|
93
|
+
|
|
94
|
+
### 7. Animated Illustrations & Icons
|
|
95
|
+
|
|
96
|
+
**Not just static SVGs**:
|
|
97
|
+
|
|
98
|
+
- Lottie animations for complex motion
|
|
99
|
+
- CSS-animated icons for micro-feedback
|
|
100
|
+
- Scroll-triggered illustration reveals
|
|
101
|
+
|
|
102
|
+
### 8. Immersive Scroll Experiences
|
|
103
|
+
|
|
104
|
+
**Techniques**:
|
|
105
|
+
|
|
106
|
+
- Scroll-linked animations (`scroll-timeline`)
|
|
107
|
+
- Parallax with purpose (not gratuitous)
|
|
108
|
+
- Horizontal scroll sections
|
|
109
|
+
- Scroll snapping for paginated feel
|
|
110
|
+
|
|
111
|
+
```css
|
|
112
|
+
@keyframes reveal {
|
|
113
|
+
from {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
transform: translateY(50px);
|
|
116
|
+
}
|
|
117
|
+
to {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
transform: translateY(0);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.reveal-section {
|
|
124
|
+
animation: reveal linear;
|
|
125
|
+
animation-timeline: view();
|
|
126
|
+
animation-range: entry 20% cover 40%;
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Emerging Technologies
|
|
131
|
+
|
|
132
|
+
### View Transitions API
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
// Smooth page transitions
|
|
136
|
+
document.startViewTransition(() => {
|
|
137
|
+
updateDOM();
|
|
138
|
+
});
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Container Queries
|
|
142
|
+
|
|
143
|
+
Truly component-based responsive design:
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
.card-container {
|
|
147
|
+
container-type: inline-size;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@container (min-width: 400px) {
|
|
151
|
+
.card {
|
|
152
|
+
flex-direction: row;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### CSS Nesting (Native)
|
|
158
|
+
|
|
159
|
+
```css
|
|
160
|
+
.card {
|
|
161
|
+
padding: 16px;
|
|
162
|
+
|
|
163
|
+
& .title {
|
|
164
|
+
font-size: 1.5rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:hover {
|
|
168
|
+
background: var(--color-surface-hover);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Popover API
|
|
174
|
+
|
|
175
|
+
Native popovers without JavaScript:
|
|
176
|
+
|
|
177
|
+
```html
|
|
178
|
+
<button popovertarget="menu">Open Menu</button>
|
|
179
|
+
<div id="menu" popover>Menu content</div>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Anti-Trends (What to Avoid)
|
|
183
|
+
|
|
184
|
+
| Trend | Problem | Alternative |
|
|
185
|
+
| -------------------------- | ------------------------------------ | ---------------------------- |
|
|
186
|
+
| Excessive parallax | Motion sickness, performance | Subtle depth, static layers |
|
|
187
|
+
| Dark patterns | Erodes trust, potential legal issues | Honest UX |
|
|
188
|
+
| Autoplaying video | Data waste, annoyance | User-initiated, muted option |
|
|
189
|
+
| Infinite scroll everywhere | Navigation issues, exhaustion | Pagination or clear sections |
|
|
190
|
+
| Cookie wall overload | UX friction | Minimal, compliant approach |
|
|
191
|
+
|
|
192
|
+
## Research Resources
|
|
193
|
+
|
|
194
|
+
### Stay Updated
|
|
195
|
+
|
|
196
|
+
- Awwwards (award-winning sites)
|
|
197
|
+
- Dribbble (design exploration)
|
|
198
|
+
- Mobbin (mobile patterns)
|
|
199
|
+
- Nielsen Norman Group (UX research)
|
|
200
|
+
- Smashing Magazine (technical)
|
|
201
|
+
- CSS-Tricks / web.dev (modern CSS)
|
|
202
|
+
|
|
203
|
+
### Testing New Trends
|
|
204
|
+
|
|
205
|
+
1. Prototype in isolation first
|
|
206
|
+
2. A/B test with real users
|
|
207
|
+
3. Measure performance impact
|
|
208
|
+
4. Check accessibility compliance
|
|
209
|
+
5. Consider browser support
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Typography Guidelines
|
|
2
|
+
|
|
3
|
+
Expert typography system for creating distinctive, readable interfaces.
|
|
4
|
+
|
|
5
|
+
## Font Selection Strategy
|
|
6
|
+
|
|
7
|
+
### Display vs Body Fonts
|
|
8
|
+
|
|
9
|
+
| Type | Purpose | Characteristics |
|
|
10
|
+
| ------- | -------------------- | ------------------------------------ |
|
|
11
|
+
| Display | Headlines, hero text | Distinctive, expressive, limited use |
|
|
12
|
+
| Body | Paragraphs, UI text | Highly readable, neutral, versatile |
|
|
13
|
+
|
|
14
|
+
### Pairing Principles
|
|
15
|
+
|
|
16
|
+
1. **Contrast**: Pair serif + sans-serif, or geometric + humanist
|
|
17
|
+
2. **Similar x-height**: Ensures visual harmony
|
|
18
|
+
3. **Shared era/style**: Art Deco display + geometric body works
|
|
19
|
+
4. **Max 2-3 fonts**: Display, body, optional mono
|
|
20
|
+
|
|
21
|
+
### Quality Indicators
|
|
22
|
+
|
|
23
|
+
- ✅ Variable font support (weight, width)
|
|
24
|
+
- ✅ Full character set (Latin Extended)
|
|
25
|
+
- ✅ Good OpenType features (ligatures, tabular nums)
|
|
26
|
+
- ✅ Hinting for screen rendering
|
|
27
|
+
- ✅ Multiple weights (3+ for body fonts)
|
|
28
|
+
|
|
29
|
+
## Typographic Scale
|
|
30
|
+
|
|
31
|
+
### Modular Scale Ratios
|
|
32
|
+
|
|
33
|
+
| Ratio | Name | Formula | Use Case |
|
|
34
|
+
| ----- | ---------------- | -------- | ------------- |
|
|
35
|
+
| 1.067 | Minor Second | Subtle | Dense UI |
|
|
36
|
+
| 1.125 | Major Second | Popular | General use |
|
|
37
|
+
| 1.200 | Minor Third | Moderate | Editorial |
|
|
38
|
+
| 1.250 | Major Third | Classic | Balanced |
|
|
39
|
+
| 1.333 | Perfect Fourth | Strong | High contrast |
|
|
40
|
+
| 1.414 | Augmented Fourth | Bold | Hero sections |
|
|
41
|
+
| 1.618 | Golden Ratio | Dramatic | Artistic |
|
|
42
|
+
|
|
43
|
+
### Recommended Scale (1.25 base)
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
text-xs: 0.64rem (10px)
|
|
47
|
+
text-sm: 0.8rem (13px)
|
|
48
|
+
text-base: 1rem (16px)
|
|
49
|
+
text-lg: 1.25rem (20px)
|
|
50
|
+
text-xl: 1.563rem (25px)
|
|
51
|
+
text-2xl: 1.953rem (31px)
|
|
52
|
+
text-3xl: 2.441rem (39px)
|
|
53
|
+
text-4xl: 3.052rem (49px)
|
|
54
|
+
text-5xl: 3.815rem (61px)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Line Height & Spacing
|
|
58
|
+
|
|
59
|
+
### Line Height by Size
|
|
60
|
+
|
|
61
|
+
| Text Size | Line Height | Reason |
|
|
62
|
+
| --------- | ----------- | --------------------- |
|
|
63
|
+
| < 14px | 1.6-1.8 | Small text needs room |
|
|
64
|
+
| 14-18px | 1.5-1.6 | Body text sweet spot |
|
|
65
|
+
| 18-24px | 1.4-1.5 | Large body |
|
|
66
|
+
| 24-32px | 1.3-1.4 | Subheads |
|
|
67
|
+
| > 32px | 1.1-1.25 | Headlines tight |
|
|
68
|
+
|
|
69
|
+
### Line Length (Measure)
|
|
70
|
+
|
|
71
|
+
- **Optimal**: 45-75 characters (65 ideal)
|
|
72
|
+
- **Mobile**: 35-50 characters
|
|
73
|
+
- **CSS**: `max-width: 65ch;`
|
|
74
|
+
|
|
75
|
+
## Text Rendering Best Practices
|
|
76
|
+
|
|
77
|
+
```css
|
|
78
|
+
body {
|
|
79
|
+
/* Smooth anti-aliasing */
|
|
80
|
+
-webkit-font-smoothing: antialiased;
|
|
81
|
+
-moz-osx-font-smoothing: grayscale;
|
|
82
|
+
|
|
83
|
+
/* Optimize for readability */
|
|
84
|
+
text-rendering: optimizeLegibility;
|
|
85
|
+
|
|
86
|
+
/* Better word breaking */
|
|
87
|
+
overflow-wrap: break-word;
|
|
88
|
+
word-break: break-word;
|
|
89
|
+
hyphens: auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
h1,
|
|
93
|
+
h2,
|
|
94
|
+
h3 {
|
|
95
|
+
/* Balance headline wrapping */
|
|
96
|
+
text-wrap: balance;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
p {
|
|
100
|
+
/* Prevent orphans/widows */
|
|
101
|
+
text-wrap: pretty;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Typographic Details
|
|
106
|
+
|
|
107
|
+
### Essential Glyphs
|
|
108
|
+
|
|
109
|
+
| Use | Wrong | Correct |
|
|
110
|
+
| -------------- | ---------- | ---------------------------- |
|
|
111
|
+
| Ellipsis | ... | … (`…`) |
|
|
112
|
+
| Quotes | "text" | "text" (`“` `”`) |
|
|
113
|
+
| Apostrophe | it's | it's (`’`) |
|
|
114
|
+
| Em dash | -- | — (`—`) |
|
|
115
|
+
| En dash | - (ranges) | – (`–`) |
|
|
116
|
+
| Multiplication | x | × (`×`) |
|
|
117
|
+
|
|
118
|
+
### Numeric Typography
|
|
119
|
+
|
|
120
|
+
```css
|
|
121
|
+
/* Tabular for tables/data alignment */
|
|
122
|
+
.data-table {
|
|
123
|
+
font-variant-numeric: tabular-nums;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Oldstyle for prose */
|
|
127
|
+
.prose {
|
|
128
|
+
font-variant-numeric: oldstyle-nums;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Slashed zero for code */
|
|
132
|
+
.code {
|
|
133
|
+
font-variant-numeric: slashed-zero;
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Responsive Typography
|
|
138
|
+
|
|
139
|
+
### Fluid Typography
|
|
140
|
+
|
|
141
|
+
```css
|
|
142
|
+
/* Clamp: min, preferred, max */
|
|
143
|
+
h1 {
|
|
144
|
+
font-size: clamp(2rem, 5vw + 1rem, 4rem);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
body {
|
|
148
|
+
font-size: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Container Query Typography
|
|
153
|
+
|
|
154
|
+
```css
|
|
155
|
+
@container (min-width: 600px) {
|
|
156
|
+
.card-title {
|
|
157
|
+
font-size: 1.5rem;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Font Loading Strategy
|
|
163
|
+
|
|
164
|
+
```html
|
|
165
|
+
<!-- Preload critical font -->
|
|
166
|
+
<link
|
|
167
|
+
rel="preload"
|
|
168
|
+
href="/fonts/main.woff2"
|
|
169
|
+
as="font"
|
|
170
|
+
type="font/woff2"
|
|
171
|
+
crossorigin
|
|
172
|
+
/>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```css
|
|
176
|
+
/* Define with fallback stack */
|
|
177
|
+
@font-face {
|
|
178
|
+
font-family: "MainFont";
|
|
179
|
+
src: url("/fonts/main.woff2") format("woff2");
|
|
180
|
+
font-display: swap; /* Show fallback immediately */
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
body {
|
|
184
|
+
font-family:
|
|
185
|
+
"MainFont",
|
|
186
|
+
system-ui,
|
|
187
|
+
-apple-system,
|
|
188
|
+
sans-serif;
|
|
189
|
+
}
|
|
190
|
+
```
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
import subprocess
|
|
4
|
+
import site
|
|
5
|
+
|
|
6
|
+
# --- Configuration ---
|
|
7
|
+
# Get the absolute path of the directory containing this script
|
|
8
|
+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
+
|
|
10
|
+
# Define local directories for libs and models
|
|
11
|
+
LOCAL_LIB_DIR = os.path.join(SCRIPT_DIR, "libs")
|
|
12
|
+
LOCAL_MODEL_DIR = os.path.join(SCRIPT_DIR, "models")
|
|
13
|
+
|
|
14
|
+
# IMPORTANT: Add the local lib directory to sys.path immediately
|
|
15
|
+
# This allows us to import packages we install into LOCAL_LIB_DIR
|
|
16
|
+
if LOCAL_LIB_DIR not in sys.path:
|
|
17
|
+
site.addsitedir(LOCAL_LIB_DIR) # addsitedir handles .pth files correctly
|
|
18
|
+
sys.path.insert(0, LOCAL_LIB_DIR) # Ensure it's first for priority
|
|
19
|
+
|
|
20
|
+
# Force rembg/u2net to use our local models directory
|
|
21
|
+
os.environ["U2NET_HOME"] = LOCAL_MODEL_DIR
|
|
22
|
+
|
|
23
|
+
def install_rembg():
|
|
24
|
+
print(f"\n[Info] The 'rembg' library is required for background removal.")
|
|
25
|
+
print(f"[Info] It will be installed LOCALLY into: {LOCAL_LIB_DIR}")
|
|
26
|
+
print(f"[Info] This will NOT affect your system-wide Python packages.\n")
|
|
27
|
+
|
|
28
|
+
print(f"Installing dependencies to {LOCAL_LIB_DIR}...")
|
|
29
|
+
os.makedirs(LOCAL_LIB_DIR, exist_ok=True)
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
# Install rembg and onnxruntime to the target directory
|
|
33
|
+
# We also upgrade pip to ensure compatibility
|
|
34
|
+
subprocess.check_call([
|
|
35
|
+
sys.executable, "-m", "pip", "install",
|
|
36
|
+
"rembg", "onnxruntime", "pillow",
|
|
37
|
+
"--target", LOCAL_LIB_DIR,
|
|
38
|
+
"--upgrade"
|
|
39
|
+
])
|
|
40
|
+
print("Installation successful.")
|
|
41
|
+
except subprocess.CalledProcessError as e:
|
|
42
|
+
print(f"Failed to install dependencies: {e}")
|
|
43
|
+
sys.exit(1)
|
|
44
|
+
|
|
45
|
+
# --- Import Logic ---
|
|
46
|
+
try:
|
|
47
|
+
# Try importing first.
|
|
48
|
+
# If standard import fails, it might be because we just added the path
|
|
49
|
+
# and site-packages logic needs a refresh or it's just not there.
|
|
50
|
+
import rembg
|
|
51
|
+
from rembg import remove, new_session
|
|
52
|
+
except ImportError:
|
|
53
|
+
# If missing, install it
|
|
54
|
+
install_rembg()
|
|
55
|
+
|
|
56
|
+
# After install, we must re-add to site dir to pick up new info
|
|
57
|
+
site.addsitedir(LOCAL_LIB_DIR)
|
|
58
|
+
import importlib
|
|
59
|
+
importlib.invalidate_caches()
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
import rembg
|
|
63
|
+
from rembg import remove, new_session
|
|
64
|
+
except ImportError as e:
|
|
65
|
+
print(f"CRITICAL ERROR: Failed to import 'rembg' even after installation.")
|
|
66
|
+
print(f"Debug Info:")
|
|
67
|
+
print(f"sys.path: {sys.path}")
|
|
68
|
+
print(f"LOCAL_LIB_DIR: {LOCAL_LIB_DIR}")
|
|
69
|
+
print(f"Error: {e}")
|
|
70
|
+
sys.exit(1)
|
|
71
|
+
|
|
72
|
+
# Standard imports (will be available now)
|
|
73
|
+
from PIL import Image
|
|
74
|
+
import io
|
|
75
|
+
|
|
76
|
+
def remove_background(input_path, output_path):
|
|
77
|
+
print(f"Processing: {input_path} -> {output_path}")
|
|
78
|
+
|
|
79
|
+
if not os.path.exists(input_path):
|
|
80
|
+
print(f"Error: Input file does not exist: {input_path}")
|
|
81
|
+
sys.exit(1)
|
|
82
|
+
|
|
83
|
+
# The AI model for background removal (~170MB) will be downloaded to LOCAL_MODEL_DIR
|
|
84
|
+
os.makedirs(LOCAL_MODEL_DIR, exist_ok=True)
|
|
85
|
+
|
|
86
|
+
# Load input image
|
|
87
|
+
try:
|
|
88
|
+
with open(input_path, 'rb') as i:
|
|
89
|
+
input_data = i.read()
|
|
90
|
+
except Exception as e:
|
|
91
|
+
print(f"Error reading input file: {e}")
|
|
92
|
+
sys.exit(1)
|
|
93
|
+
|
|
94
|
+
# Create session with isnet-general-use (default)
|
|
95
|
+
# The library handles the download if U2NET_HOME is set and we call new_session
|
|
96
|
+
print("Initializing AI session (this may trigger the download to {})...".format(LOCAL_MODEL_DIR))
|
|
97
|
+
try:
|
|
98
|
+
session = new_session("isnet-general-use")
|
|
99
|
+
except Exception as e:
|
|
100
|
+
print(f"Error initializing session: {e}")
|
|
101
|
+
sys.exit(1)
|
|
102
|
+
|
|
103
|
+
# Apply background removal with alpha matting
|
|
104
|
+
print("Applying background removal...")
|
|
105
|
+
try:
|
|
106
|
+
output_data = remove(
|
|
107
|
+
input_data,
|
|
108
|
+
session=session,
|
|
109
|
+
alpha_matting=True,
|
|
110
|
+
alpha_matting_foreground_threshold=240,
|
|
111
|
+
alpha_matting_background_threshold=10,
|
|
112
|
+
alpha_matting_erode=10
|
|
113
|
+
)
|
|
114
|
+
except Exception as e:
|
|
115
|
+
print(f"Error during removal process: {e}")
|
|
116
|
+
sys.exit(1)
|
|
117
|
+
|
|
118
|
+
# Save output
|
|
119
|
+
try:
|
|
120
|
+
with open(output_path, 'wb') as o:
|
|
121
|
+
o.write(output_data)
|
|
122
|
+
print("Background removal complete.")
|
|
123
|
+
except Exception as e:
|
|
124
|
+
print(f"Error writing output file: {e}")
|
|
125
|
+
sys.exit(1)
|
|
126
|
+
|
|
127
|
+
if __name__ == "__main__":
|
|
128
|
+
if len(sys.argv) != 3:
|
|
129
|
+
print("Usage: python3 remove_background.py <input_path> <output_path>")
|
|
130
|
+
sys.exit(1)
|
|
131
|
+
|
|
132
|
+
input_file = sys.argv[1]
|
|
133
|
+
output_file = sys.argv[2]
|
|
134
|
+
|
|
135
|
+
remove_background(input_file, output_file)
|