Skip to content

feat: recursive upload to sync a folder as a page tree - #14

Merged
blaipr merged 1 commit into
mainfrom
feat/recursive-upload
Aug 12, 2026
Merged

feat: recursive upload to sync a folder as a page tree#14
blaipr merged 1 commit into
mainfrom
feat/recursive-upload

Conversation

@blaipr

@blaipr blaipr commented Aug 12, 2026

Copy link
Copy Markdown
Member

Problem

download --recursive exports a page tree, but there is no way back: pushing a folder of Markdown files means one upload/edit invocation per file, by hand, in the right order.

Change

Adds upload --recursive <folder> <parent_url>: every <name>.md becomes a page under the parent and sibling <name>/ folders recurse as children — exactly the layout recursive download writes. Per file, the title comes from the leading # h1 (filename fallback, underscores to spaces), and the target page is picked by version marker first, then title lookup, else a new page is created. Marker version conflicts skip the file with a warning unless --force. Local images are attached per page as in single uploads. The title positional becomes optional (validated as required in non-recursive mode).

Compatibility

Single-file upload behavior is unchanged. upload gains --recursive/--force flags.

Checklist

  • ruff check src tests, ruff format --check src tests, python -m pytest tests/ pass locally
  • Tests added (fake-client hierarchy, update-by-title, marker guard, --force, filename fallback)
  • Docs updated (docs/usage.md upload section)
  • CHANGELOG.md updated under Unreleased

@blaipr
blaipr merged commit b7179f0 into main Aug 12, 2026
1 check passed
@blaipr
blaipr deleted the feat/recursive-upload branch August 12, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant