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
- Install Instaloader
- Export your Instagram data:
instaloader --login=yourusername --dirname-pattern={profile}Or for specific profile:
instaloader profile:yourusername - 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 exportsoutput_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
| Option | Description |
|---|---|
--dry-run | Preview changes without modifying files |
--backup | Create 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 pathKIRBY_INSTAGRAM_FEED- Output feed directory
Acknowledgments
- Instaloader - Instagram data export tool
- KirbyCMS - Flexible, file-based CMS
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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 emiland/kirby-instagram-importer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Handles basic OAuth/OAuth2 authentication along with classes for common services
Craft CMS plugin to receive Instagram feed data as variable in templates.
A block that displays featured content - large image, title, description and link.
Simple Sharing generates social media share links within CP entry pages, allowing you to quickly & easily share entries.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
Lets you add foreign keys in a swift! Foreign key adder in laravel migration.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 39
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-13