Crier: 콘텐츠를 어디서든 교차 게시
Source: Dev.to
번역할 텍스트가 제공되지 않았습니다. 번역이 필요한 내용을 알려주시면 도와드리겠습니다.
개요
crier는 여러 플랫폼에 동시에 콘텐츠를 교차 게시할 수 있는 명령줄 도구입니다.
한 번 글을 작성하면 dev.to, Ghost, WordPress, Hashnode, Medium, Bluesky, Mastodon, Threads, Telegram, Discord 등 다양한 서비스에 바로 게시할 수 있습니다.
pip install crier
문제
블로그를 유지하고 여러 플랫폼에서 청중에게 도달하려면 보통 번거로운 수동 작업이 필요합니다:
- dev.to에 콘텐츠 복사
- 링크가 포함된 Bluesky 게시물 만들기
- Mastodon에 Toot 게시
- Discord 등에 공지 게시
각 플랫폼마다 고유한 인터페이스, API 및 특성이 있습니다.
해결책: 한 번의 명령으로 모든 곳에 게시하기
crier publish post.md --to devto --to bluesky --to mastodon --to discord
The command:
- 전체 기사를 dev.to에 게시합니다
- 제목, 설명, 링크가 포함된 Bluesky 게시물을 생성합니다
- 태그에서 파생된 해시태그와 함께 Mastodon에 토트를 보냅니다
- Discord 서버에 임베드 공지를 전송합니다
지원되는 플랫폼
| 플랫폼 | 유형 | 비고 |
|---|---|---|
| dev.to | 블로그 | 전체 기사 지원 |
| Hashnode | 블로그 | 전체 기사 지원 |
| Medium | 블로그 | 게시 전용 |
| Ghost | 블로그 | 전체 기사 지원 |
| WordPress | 블로그 | 자체 호스팅 또는 .com |
| Buttondown | 뉴스레터 | 이메일 구독자 |
| Bluesky | 소셜 | 링크 카드가 포함된 게시물 |
| Mastodon | 소셜 | 해시태그가 포함된 트윗 |
| Threads | 소셜 | 짧은 게시물 |
| 소셜 | 전문 네트워크 | |
| Twitter/X | 소셜 | 복사‑붙여넣기 모드 |
| Telegram | 채널 | 봇 게시물 |
| Discord | 채널 | 웹훅 임베드 |
Markdown 입력 형식
crier는 선택적인 YAML 프론트 매터가 포함된 표준 Markdown 파일을 읽습니다:
---
title: "My Post Title"
description: "A brief description"
tags: [python, cli, automation]
canonical_url: https://myblog.com/my-post
---
- 블로그 플랫폼용 – 전체 글이 게시됩니다.
- 소셜 플랫폼용 –
canonical_url로 돌아가는 짧은 안내문이 생성됩니다.
Source: …
GitHub Actions 통합
crier를 GitHub Actions와 결합하여 푸시마다 자동으로 교차 게시합니다.
액션 초기화
crier init-action
이 명령은 워크플로 파일을 생성하고 API 키를 GitHub 시크릿으로 설정합니다.
예시 워크플로 (.github/workflows/crosspost.yml)
name: Cross-Post Content
on:
push:
branches: [main]
paths:
- 'posts/**/*.md'
jobs:
crosspost:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install crier
- name: Cross-post to platforms
env:
CRIER_DEVTO_API_KEY: ${{ secrets.CRIER_DEVTO_API_KEY }}
CRIER_BLUESKY_API_KEY: ${{ secrets.CRIER_BLUESKY_API_KEY }}
run: |
crier backfill ./posts --yes
- name: Save publication state
run: |
git config user.name "github-actions[bot]"
git add .crier/
git diff --staged --quiet || git commit -m "Update publication registry"
git push
발행 레지스트리
crier는 발행된 항목을 추적하는 레지스트리(.crier/registry.yaml)를 유지합니다:
posts:
"posts/my-article.md":
title: "My Article"
publications:
devto:
id: "12345"
url: https://dev.to/user/my-article
bluesky:
id: "abc123"
나중에 새로운 플랫폼을 추가하면 기존 콘텐츠가 자동으로 백필(backfill)됩니다.
CLI 레퍼런스
| Command | Description |
|---|---|
crier publish FILE [--to PLATFORM]... | 하나 이상의 플랫폼에 게시 |
crier backfill PATH [--profile NAME] | 누락된 콘텐츠 게시 |
crier audit PATH | 게시가 필요한 항목 표시 |
crier list PLATFORM | 플랫폼에서 내 기사 목록 보기 |
crier update PLATFORM ID --file FILE | 기존 게시물 업데이트 |
crier platforms | 사용 가능한 플랫폼 표시 |
crier config set KEY VALUE | API 키 설정 |
crier init-action | GitHub Actions 워크플로우 설정 |
API 키 설정
crier config set devto.api_key YOUR_DEV_TO_KEY
crier config set bluesky.api_key "handle.bsky.social:app-password"
crier config set mastodon.api_key "mastodon.social:access-token"
프로필 정의
Create ~/.config/crier/config.yaml:
profiles:
blogs: [devto, hashnode]
social: [bluesky, mastodon]
all: [blogs, social]
Use a profile:
crier publish post.md --profile all
링크
- PyPI:
- GitHub:
- Documentation: