Skip to content

notque/vexjoy-agent / skills/content/content

content

Unverified

Content operations: editorial calendar, marketing, publishing, social media management.

FileKindSize
SKILL.mdskill md11.5 KB
references/at-protocol-api.mdmarkdown7.6 KB
references/at-protocol-preferred-patterns.mdmarkdown8.5 KB
references/batch-edit-examples.mdmarkdown6.9 KB
references/batch-edit-operation-types.mdmarkdown7.0 KB
references/batch-edit-regex-patterns.mdmarkdown5.4 KB
references/batch-edit-safety-checklist.mdmarkdown6.0 KB
references/batch-edit.mdmarkdown9.9 KB
references/calendar-format.mdmarkdown3.5 KB
references/campaign-planning.mdmarkdown17.5 KB
references/classification-prompt.mdmarkdown5.9 KB
references/content-engine.mdmarkdown8.7 KB
references/content-engine/error-handling.mdmarkdown7.8 KB
references/content-engine/phase-playbook.mdmarkdown8.3 KB
references/content-engine/platform-specs.mdmarkdown10.9 KB
references/content-strategy.mdmarkdown14.5 KB
references/email-sequences.mdmarkdown15.8 KB
references/error-handling.mdmarkdown8.2 KB
references/headlines.mdmarkdown5.9 KB
references/image-audit-alt-text-examples.mdmarkdown6.8 KB
references/image-audit-format-selection.mdmarkdown5.8 KB
references/image-audit-report-templates.mdmarkdown3.8 KB
references/image-audit-size-guidelines.mdmarkdown4.2 KB
references/image-audit.mdmarkdown10.4 KB
references/link-audit-false-positives.mdmarkdown4.1 KB
references/link-audit-fix-strategies.mdmarkdown7.1 KB
references/link-audit-graph-metrics.mdmarkdown5.0 KB
references/link-audit.mdmarkdown7.8 KB
references/llm-marketing-failure-modes.mdmarkdown18.7 KB
references/marketing.mdmarkdown20.4 KB
references/metrics.mdmarkdown7.4 KB
references/news-collection.mdmarkdown5.2 KB
references/operations.mdmarkdown5.8 KB
references/outline-examples.mdmarkdown11.2 KB
references/outline-structure-templates.mdmarkdown6.4 KB
references/outline.mdmarkdown8.9 KB
references/pagespeed-insights.mdmarkdown10.4 KB
references/pipeline-stages.mdmarkdown3.3 KB
references/pre-publish-checklist.mdmarkdown7.4 KB
references/pre-publish-hugo-frontmatter.mdmarkdown5.3 KB
references/pre-publish-seo-guidelines.mdmarkdown4.1 KB
references/pre-publish.mdmarkdown10.8 KB
references/reddit-moderate.mdmarkdown7.9 KB
references/script-commands.mdmarkdown3.7 KB
references/seo-audit.mdmarkdown16.4 KB
references/seo-guidelines.mdmarkdown5.5 KB
references/seo-keyword-placement.mdmarkdown6.0 KB
references/seo-title-patterns.mdmarkdown5.6 KB
references/seo.mdmarkdown8.9 KB
references/series-planner.mdmarkdown11.7 KB
references/series-planner/cadence-guidelines.mdmarkdown6.8 KB
references/series-planner/cross-linking.mdmarkdown7.2 KB
references/series-planner/output-format.mdmarkdown3.8 KB
references/series-planner/series-types.mdmarkdown7.6 KB
references/taxonomy-audit-report-format.mdmarkdown3.2 KB
references/taxonomy-consolidation-rules.mdmarkdown6.7 KB
references/taxonomy-examples.mdmarkdown9.7 KB
references/taxonomy-guidelines.mdmarkdown5.5 KB
references/taxonomy.mdmarkdown9.0 KB
references/topic-brainstormer.mdmarkdown10.1 KB
references/topic-brainstormer/content-filter.mdmarkdown7.1 KB
references/topic-brainstormer/priority-scoring.mdmarkdown8.1 KB
references/topic-brainstormer/topic-sources.mdmarkdown7.6 KB
references/wordpress-upload.mdmarkdown11.2 KB
references/x-api.mdmarkdown7.8 KB
scripts/publish/link_scanner.pyscript21.4 KB
scripts/publish/pagespeed.pyscript15.3 KB
scripts/publish/tests/test_load_env_file.pyscript3.8 KB
scripts/publish/tests/test_wordpress_inline_urls.pyscript4.4 KB
scripts/publish/tests/test_wordpress_media_upload.pyscript1.5 KB
scripts/publish/tests/test_wordpress_scraper.pyscript4.1 KB
scripts/publish/wordpress-edit-post.pyscript21.2 KB
scripts/publish/wordpress-media-upload.pyscript8.7 KB
scripts/publish/wordpress-scraper.pyscript23.4 KB
scripts/publish/wordpress-upload.pyscript44.2 KB
scripts/reddit-moderate/reddit-automod-cron.shscript3.9 KB
scripts/reddit-moderate/reddit-mod.pyscript83.0 KB
scripts/reddit-moderate/tests/test_reddit_mod.pyscript31.3 KB

scripts/publish/tests/test_wordpress_inline_urls.py

View on GitHub
"""Tests for URL escaping in wordpress-upload.py and wordpress-edit-post.py."""

from __future__ import annotations

import importlib.util
from pathlib import Path

import pytest

PUBLISH_DIR = Path(__file__).parent.parent

# -- Load wordpress-upload.py (no requests dependency at top level) -----------

_upload_spec = importlib.util.spec_from_file_location(
    "wordpress_upload",
    PUBLISH_DIR / "wordpress-upload.py",
)
_upload_mod = importlib.util.module_from_spec(_upload_spec)
_upload_spec.loader.exec_module(_upload_mod)

_apply_inline = _upload_mod._apply_inline_formatting

# -- Load wordpress-edit-post.py (needs requests at import time) --------------

requests = pytest.importorskip("requests")

_edit_spec = importlib.util.spec_from_file_location(
    "wordpress_edit_post",
    PUBLISH_DIR / "wordpress-edit-post.py",
)
_edit_mod = importlib.util.module_from_spec(_edit_spec)
_edit_spec.loader.exec_module(_edit_mod)

_md_to_html = _edit_mod.markdown_to_html


# -- Parametrized test cases --------------------------------------------------

LINK_CASES = [
    pytest.param(
        "[a](https://example.com/x)",
        '<a href="https://example.com/x">a</a>',
        id="plain-link",
    ),
    pytest.param(
        "[a](https://example.com/?x=1&y=2)",
        "x=1&amp;y=2",
        id="query-string-ampersand",
    ),
    pytest.param(
        '[a](https://example.com/" onmouseover="alert(1))',
        None,  # checked specially below
        id="quote-injection",
    ),
    pytest.param(
        "[a](javascript:void(0))",
        None,  # no <a, text kept
        id="script-scheme",
    ),
    pytest.param(
        "[a](/about)",
        '<a href="/about">a</a>',
        id="relative-link",
    ),
    pytest.param(
        "[a](#top)",
        '<a href="#top">a</a>',
        id="anchor-link",
    ),
    pytest.param(
        "[a](mailto:someone@example.com)",
        '<a href="mailto:someone@example.com">a</a>',
        id="mailto-link",
    ),
]

IMAGE_CASES = [
    pytest.param(
        "![alt](data:text/html;base64,AAAA)",
        None,  # no <img, text kept
        id="data-scheme-image",
    ),
    pytest.param(
        '![say "hi"](https://example.com/i.png)',
        'alt="say &quot;hi&quot;"',
        id="alt-with-quote",
    ),
]


# -- Upload script tests (_apply_inline_formatting) --------------------------


class TestUploadInlineFormatting:
    """Tests for _apply_inline_formatting in wordpress-upload.py."""

    @pytest.mark.parametrize("md,expected", LINK_CASES)
    def test_link(self, md: str, expected: str | None) -> None:
        result = _apply_inline(md)
        if md == "[a](javascript:void(0))":
            assert "<a " not in result
            assert "a" in result
        elif md.startswith('[a](https://example.com/" '):
            # quote-injection: exactly one href attribute, injected attr inside it
            assert result.count('href="') == 1
            assert (
                "&quot;" in result or "&#x27;" in result or "onmouseover" not in result.split('href="')[1].split('"')[1]
                if 'href="' in result
                else True
            )
        elif expected is not None:
            assert expected in result

    @pytest.mark.parametrize("md,expected", IMAGE_CASES)
    def test_image(self, md: str, expected: str | None) -> None:
        result = _apply_inline(md)
        if md.startswith("![alt](data:"):
            assert "<img" not in result
            assert "alt" in result
        elif expected is not None:
            assert expected in result


# -- Edit-post script tests (markdown_to_html) -------------------------------


class TestEditPostMarkdownToHtml:
    """Tests for markdown_to_html in wordpress-edit-post.py."""

    @pytest.mark.parametrize("md,expected", LINK_CASES)
    def test_link(self, md: str, expected: str | None) -> None:
        result = _md_to_html(md)
        if md == "[a](javascript:void(0))":
            assert "<a " not in result
            assert "a" in result
        elif md.startswith('[a](https://example.com/" '):
            assert result.count('href="') == 1
        elif expected is not None:
            assert expected in result

    @pytest.mark.parametrize("md,expected", IMAGE_CASES)
    def test_image(self, md: str, expected: str | None) -> None:
        result = _md_to_html(md)
        if md.startswith("![alt](data:"):
            assert "<img" not in result
            assert "alt" in result
        elif expected is not None:
            assert expected in result
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: 197kUpdated 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