Skip to content

feat: add local format conversion command#92

Merged
pchuri merged 2 commits intomainfrom
feat/convert-command
Apr 4, 2026
Merged

feat: add local format conversion command#92
pchuri merged 2 commits intomainfrom
feat/convert-command

Conversation

@pchuri
Copy link
Copy Markdown
Owner

@pchuri pchuri commented Apr 4, 2026

Description

Add a convert command for offline conversion between content formats (markdown, storage, html, text) without requiring a Confluence server connection.

Resolves #91

Supported conversions:

From To
markdown storage, html, text
html storage, markdown, text
storage markdown, html, text

Usage:

# stdin/stdout
echo "# Hello" | confluence convert --input-format markdown --output-format storage

# file-based
confluence convert -i doc.md -o doc.xml --input-format markdown --output-format storage

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

  • Tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Implementation Details

  • Added ConfluenceClient.createLocalConverter() static factory that creates a lightweight instance with only the markdown parser, skipping HTTP client setup
  • Supports --input-file/--output-file options (defaults to stdin/stdout for piping)
  • 12 new tests covering all conversion paths and error cases
  • Updated README.md and SKILL.md documentation

pchuri added 2 commits April 4, 2026 20:13
Add `convert` command for offline conversion between content formats
(markdown, storage, html, text) without requiring a Confluence server
connection.

Closes #91
Replace /dev/stdin with process.stdin.fd for cross-platform stdin
reading. Convert stdin-based tests to file-based to avoid ENXIO errors
in CI environments where stdin is not available.
@pchuri pchuri merged commit 5425e4e into main Apr 4, 2026
6 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 4, 2026
# [1.28.0](v1.27.8...v1.28.0) (2026-04-04)

### Features

* add local format conversion command ([#92](#92)) ([5425e4e](5425e4e)), closes [#91](#91)
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Local conversion between formats

1 participant