Skip to content

anbeime/skill / skills/qiaomu-x-article-publisher/qiaomu-x-article-publisher-github

x-article-publisher

Verified

内容创作者在需要将 Markdown 长文发布到 X (Twitter) 时,使用此技能一键将 Markdown 自动转换为富文本并发布至 X Articles,完美保留排版,免去手动调整与重复登录烦恼,让长文分发更高效。

FileKindSize
.gitignoreother392 B
CHANGELOG.mdmarkdown1.5 KB
CONTRIBUTING.mdmarkdown2.4 KB
LICENSEother1.0 KB
README.mdmarkdown3.4 KB
README_FULL.mdmarkdown5.0 KB
SKILL.mdskill md7.5 KB
data/.gitignoreother701 B
data/.gitkeepother0 B
data/browser_state/.gitkeepother53 B
metadata.jsonconfig702 B
scripts/auth_manager.pyscript8.9 KB
scripts/copy_to_clipboard.pyscript6.0 KB
scripts/debug_editor.pyscript4.9 KB
scripts/debug_page.pyscript2.3 KB
scripts/parse_markdown.pyscript16.7 KB
scripts/publish_article.pyscript39.5 KB
scripts/site_config.pyscript1.7 KB

scripts/debug_page.py

View on GitHub
#!/usr/bin/env python3
"""调试脚本 - 查看 X Articles 页面结构"""

import sys
import time
from pathlib import Path

from patchright.sync_api import sync_playwright

SKILL_DIR = Path(__file__).parent.parent
BROWSER_STATE_DIR = SKILL_DIR / "data" / "browser_state"
BROWSER_PROFILE_DIR = BROWSER_STATE_DIR / "browser_profile"
STATE_FILE = BROWSER_STATE_DIR / "state.json"

sys.path.insert(0, str(SKILL_DIR / "lib"))
from browser_auth import BrowserFactory

def main():
    print("🔍 调试 X Articles 页面...")

    playwright = sync_playwright().start()

    context = BrowserFactory.launch_persistent_context(
        playwright,
        user_data_dir=BROWSER_PROFILE_DIR,
        state_file=STATE_FILE,
        headless=False  # 显示浏览器
    )

    page = context.new_page()

    # 导航到 Articles
    print("📍 导航到 X Articles...")
    page.goto("https://x.com/compose/articles", wait_until="domcontentloaded")
    time.sleep(3)

    # 截图
    screenshot_path = "/tmp/x_articles_debug.png"
    page.screenshot(path=screenshot_path, full_page=True)
    print(f"📸 截图已保存: {screenshot_path}")

    # 打印页面标题和URL
    print(f"📄 页面标题: {page.title()}")
    print(f"🔗 当前URL: {page.url}")

    # 查找所有按钮
    print("\n🔘 页面上的按钮:")
    buttons = page.query_selector_all("button")
    for i, btn in enumerate(buttons[:20]):  # 只打印前20个
        text = btn.inner_text().strip()[:50] if btn.inner_text() else ""
        print(f"  [{i}] {text}")

    # 查找所有链接
    print("\n🔗 页面上的链接:")
    links = page.query_selector_all("a")
    for i, link in enumerate(links[:20]):
        text = link.inner_text().strip()[:50] if link.inner_text() else ""
        href = link.get_attribute("href") or ""
        print(f"  [{i}] {text} -> {href[:50]}")

    # 查找可能的"create"相关元素
    print("\n🔍 查找 'create' 相关元素:")
    create_elements = page.query_selector_all("[data-testid*='create'], [aria-label*='create'], button:has-text('create'), a:has-text('create')")
    for elem in create_elements:
        print(f"  找到: {elem.inner_text()[:50]}")

    # 等待用户查看
    print("\n⏳ 浏览器将在 60 秒后关闭...")
    time.sleep(60)

    context.close()
    playwright.stop()

if __name__ == "__main__":
    main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall