Skip to content

dfk1352/LibreOffice-skills / skills/libreoffice-calc

libreoffice-calc

Verified

Use when creating, editing, formatting, exporting, or extracting LibreOffice Calc (.ods) spreadsheets via UNO, including session-based cell and range edits, sheets, named ranges, validation, charts, patch workflows, and snapshots.

scripts/calc/exceptions.py

View on GitHub
"""Custom exceptions for the Calc skill."""

from exceptions import (
    DocumentNotFoundError as _BaseDocumentNotFoundError,
    PatchOperationError as _BasePatchOperationError,
    PatchSyntaxError as _BasePatchSyntaxError,
    SessionClosedError,
    SkillError,
    SnapshotError as _BaseSnapshotError,
)


class CalcSkillError(SkillError):
    """Base error for Calc skill."""


class CalcSessionError(CalcSkillError, SessionClosedError):
    """Error for Calc session lifecycle misuse."""


class PatchSyntaxError(CalcSkillError, _BasePatchSyntaxError):
    """Error for malformed Calc patch input."""


class PatchOperationError(CalcSkillError, _BasePatchOperationError):
    """Base error for parsed Calc patch operations."""


class InvalidTargetError(PatchOperationError):
    """Error for malformed or contradictory targets."""


class TargetNoMatchError(PatchOperationError):
    """Error when a valid target matches no Calc content."""


class TargetAmbiguousError(PatchOperationError):
    """Error when a valid target matches more than one result."""


class InvalidFormattingError(PatchOperationError):
    """Error for empty or unsupported formatting payloads."""


class InvalidValidationError(PatchOperationError):
    """Error for malformed or unsupported validation payloads."""


class InvalidPayloadError(PatchOperationError):
    """Error for invalid operation payload data."""


class NamedRangeNotFoundError(PatchOperationError):
    """Error when a named range target cannot be resolved."""


class ChartNotFoundError(PatchOperationError):
    """Error when a chart target cannot be resolved."""


class DocumentNotFoundError(CalcSkillError, _BaseDocumentNotFoundError):
    """Error when spreadsheet file does not exist."""


class SnapshotError(CalcSkillError, _BaseSnapshotError):
    """Base error for snapshot operations."""


class InvalidSheetError(SnapshotError):
    """Error when sheet name does not exist."""


class InvalidAreaError(SnapshotError):
    """Error when area coordinates are invalid."""


class FilterError(SnapshotError):
    """Error when PNG export filter fails."""


__all__ = [
    "CalcSkillError",
    "CalcSessionError",
    "PatchSyntaxError",
    "PatchOperationError",
    "InvalidTargetError",
    "TargetNoMatchError",
    "TargetAmbiguousError",
    "InvalidFormattingError",
    "InvalidValidationError",
    "InvalidPayloadError",
    "NamedRangeNotFoundError",
    "ChartNotFoundError",
    "DocumentNotFoundError",
    "SnapshotError",
    "InvalidSheetError",
    "InvalidAreaError",
    "FilterError",
    "SessionClosedError",
]
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated 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: 196kUpdated Claude CodeCodexVerifiedInstall