Skip to content

Feat/17 refine the medium to obsidian flow#21

Open
edgarbc wants to merge 6 commits into
mainfrom
feat/17-refine-the-medium-to-obsidian-flow
Open

Feat/17 refine the medium to obsidian flow#21
edgarbc wants to merge 6 commits into
mainfrom
feat/17-refine-the-medium-to-obsidian-flow

Conversation

@edgarbc

@edgarbc edgarbc commented May 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

@edgarbc edgarbc requested a review from Copilot May 28, 2026 13:20
@edgarbc edgarbc self-assigned this May 28, 2026
@edgarbc edgarbc linked an issue May 28, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit Obsidian output mode to medium2md so Medium export conversions can produce either Hugo page bundles (existing default) or flat Obsidian vault notes, controlled via a new --format/-f CLI option.

Changes:

  • Introduces OutputFormat and extends the pipeline to support Obsidian note writing (write_note) and configurable image localization (images_dir, src_prefix).
  • Updates the CLI to route conversion to Hugo vs Obsidian layouts and to print the selected format.
  • Adds a new pytest suite covering slugging, writers, conversion, discovery, and CLI end-to-end behavior; updates docs and dev dependencies accordingly.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
medium2md/pipeline.py Adds output-format enum, parameterizes image localization, and implements Obsidian note writer.
medium2md/cli.py Adds --format option and branches conversion/writing for Hugo vs Obsidian output.
tests/test_pipeline.py New pytest coverage for pipeline helpers and CLI end-to-end Hugo/Obsidian flows.
tests/__init__.py Ensures tests are treated as a package (enables imports in some environments).
pyproject.toml Adds pytest to dev optional dependencies.
README.md Documents --format usage and describes Hugo vs Obsidian output structures/front matter.
uv.lock Locks new dev dependency (pytest) and its transitive requirements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread medium2md/pipeline.py Outdated
Comment thread medium2md/pipeline.py Outdated
Comment thread tests/test_pipeline.py Outdated
Comment thread tests/test_pipeline.py Outdated
Comment on lines +225 to +230
def test_find_post_html_files_excludes_non_post_dirs(tmp_path):
for d in ("blocks", "bookmarks", "claps"):
(tmp_path / d).mkdir()
(tmp_path / d / "x.html").write_text("<html/>")
(tmp_path / "README.html").write_text("<html/>")
(tmp_path / "my-post.html").write_text("<html/>")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 1890f38.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Refine the medium to obsidian flow

3 participants