emiland/kirby-instagram-importer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

emiland/kirby-instagram-importer

Composer 安装命令:

composer require emiland/kirby-instagram-importer

包简介

Import Instagram posts from Instaloader exports to KirbyCMS format

README 文档

README

Import Instagram posts from Instaloader exports to KirbyCMS format.

Mission

Take ownership of your content and use your personal website as the hub for content syndication.

This tool helps you to group and convert your Instagram content to post.txt pages and gives you a head start in transitioning from publishing on Instagram to publishing from your own personal KirbyCMS website instead.

Requirements

  • PHP 8.1+
  • Instaloader for Instagram exports
  • KirbyCMS 3.9+ or 4.0+ or 5.0+ (optional, for CLI command)

Installation

Option A: With KirbyCMS

cd /path/to/kirby-site
composer require emiland/kirby-instagram-importer

The plugin automatically installs the CLI command. Run:

kirby import:instagram --dry-run  # Preview changes
kirby import:instagram --backup   # Import with backup
kirby import:instagram            # Import directly

Option B: Standalone (without Kirby)

composer require emiland/kirby-instagram-importer

Run the import script:

composer run import                 # Import directly
composer run import-dry            # Preview changes
composer run import -- --backup    # Import with backup

Usage

Prepare Your Instagram Export

  1. Install Instaloader
  2. Export your Instagram data:
    instaloader --login=yourusername --dirname-pattern={profile}
    

    Or for specific profile:

    instaloader profile:yourusername
    
  3. The script expects Instaloader's filename format: YYYY-MM-DD_HH-MM-SS_UTC_N.ext

Run Import

kirby import:instagram <source_dir> [output_dir]

Arguments:

  • source_dir (required) - Directory containing Instaloader exports
  • output_dir (optional) - Output directory for feed content (default: auto-detect)

Examples:

# Import from specific directory (output auto-detected)
kirby import:instagram /path/to/instaloader-export

# Import with custom output directory
kirby import:instagram /path/to/export /path/to/kirby/content/feed

# Preview changes
kirby import:instagram /path/to/export --dry-run

# Import with backup
kirby import:instagram /path/to/export --backup

Options

OptionDescription
--dry-runPreview changes without modifying files
--backupCreate timestamped backup of source files before import

Output Structure

The importer auto-detects your project structure:

Within a KirbyCMS project (if /content folder exists):

/content/feed/
└── {year}/
    └── {monthName}-{day}/
        ├── post.txt          # Kirby content file
        └── {media files}    # Copied images/videos

Standalone (no /content folder detected):

./feed/
└── {year}/
    └── {monthName}-{day}/
        ├── post.txt
        └── {media files}

Custom output directory:

kirby import:instagram /path/to/export /custom/output/path

Content File Format (post.txt)

Title: May 27th
----
Uuid: abc123def456
----
Text:
Original caption with @mentions converted to Kirby links
----
Tags: art, travel, food
----

Transformations

  • @mentions(link: https://instagram.com/username text:@username)
  • Hashtags → Extracted to Tags field (deduplicated, alphabetical)
  • Pure hashtag lines → Moved to Tags field
  • Line breaks → Preserved as-is
  • Profile pictures (media-only posts) → Skipped

Configuration

Environment Variables

For CI/CD environments, you can set:

  • KIRBY_INSTAGRAM_SOURCE - Source directory path
  • KIRBY_INSTAGRAM_FEED - Output feed directory

Acknowledgments

License

MIT License - See LICENSE for details.

Contributing

Issues and pull requests welcome at Codeberg.

emiland/kirby-instagram-importer 适用场景与选型建议

emiland/kirby-instagram-importer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「migration」 「content」 「instagram」 「importer」 「kirby」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 emiland/kirby-instagram-importer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 emiland/kirby-instagram-importer 我们能提供哪些服务?
定制开发 / 二次开发

基于 emiland/kirby-instagram-importer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-13