定制 trendyminds/distributary 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

trendyminds/distributary

Composer 安装命令:

composer require trendyminds/distributary

包简介

Import a Google Docs HTML archive and let AI map it into Statamic page blocks.

README 文档

README

A Statamic 6 addon that turns a Google Docs export into a draft page entry. Upload a "Web Page" .zip, and Claude maps the document's HTML and images into your existing replicator blocks. The import always lands as a draft so an editor can review before publishing.

Requirements

  • PHP 8.4+
  • Statamic 6
  • A pages collection with a blocks replicator field
  • An uploads asset container
  • A configured laravel/ai provider (Anthropic by default)

Installation

composer require trendyminds/distributary

Then set your AI credentials in .env (see laravel/ai's docs for the provider you're using):

ANTHROPIC_API_KEY=...

Usage

The addon registers a CP utility at Utilities → AI Import (the display name is configurable — see below).

  1. In Google Docs, choose File → Download → Web Page (.html, zipped).
  2. Upload the .zip in the utility.
  3. Wait for the import to process (parse, image upload, AI mapping).
  4. Review the proposed blocks on the preview screen, edit the title, and confirm.
  5. The addon creates a draft entry in pages and drops you on its edit screen.

Configuration

The defaults work out of the box. To customize, publish the config:

php artisan vendor:publish --tag=distributary-config
Env Default Notes
DISTRIBUTARY_DISPLAY_NAME AI Import The name shown to content authors in the CP utility list, nav, and page titles.
DISTRIBUTARY_PROVIDER anthropic Any provider configured in config/ai.php.
DISTRIBUTARY_MODEL claude-opus-4-7 Model identifier for that provider.

How it works

  1. Parse — extracts HTML and images from the .zip to a temporary directory.
  2. Import images — streams each image into the uploads asset container under distributary/YYYY-MM/.
  3. Inspect blueprint — reads the pages collection's blocks replicator and summarizes each set for the model.
  4. Map — sends the document HTML, blueprint summary, and image references to Claude, which returns a structured block list.
  5. Preview — renders the proposed entry for review. Mapping results are cached for 30 days keyed by file hash, so re-uploads are instant.
  6. Confirm — builds a draft entry from the approved mapping.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固