Skip to main content

MdLens

軽量な読み取り専用 Markdown リーダーです。 ブラウザ上で左に階層ファイル一覧、右にレンダリング済み Markdown を表示します。

使い方

uv run mdlens index C:\path\to\markdown-folder
uv run mdlens app C:\path\to\markdown-folder

現在のフォルダを対象にする場合:

uv run mdlens index
uv run mdlens app

index ファイルは既定では対象フォルダ内に作成せず、ユーザーデータ領域に保存します。Windows では通常 %LOCALAPPDATA%\MdLens\indexes\... です。保存先を明示したい場合は --index PATH、既定の親ディレクトリを変えたい場合は環境変数 MDLENS_DATA_DIR を使えます。

GitHub/GitLab リポジトリ

画面上部の入力欄には、ローカルフォルダパスの代わりに GitHub/GitLab のリポジトリURLも入力できます。

https://github.com/owner/repository
github.com/owner/repository
https://gitlab.com/group/subgroup/repository

Go を押すと、対象リポジトリをOSの一時フォルダへ shallow clone し、その clone 先をMarkdownの読み取り対象にします。別のフォルダやリポジトリへ切り替えた場合、直前に使っていた一時 clone フォルダは削除されます。

この機能はローカルの git コマンドを使用するため、Git for Windows が必要です。

構成

src/mdlens/
  cli.py         # CLI、アプリ起動
  config.py      # 設定値、アプリ設定モデル
  db.py          # SQLAlchemy engine、schema、FTS 操作
  indexer.py     # Markdown 走査、index 更新
  markdown.py    # Markdown 読み込み、HTML レンダリング
  models.py      # SQLAlchemy ORM モデル
  repo_clone.py  # GitHub/GitLab clone 用一時作業領域
  repository.py  # 一覧取得、検索
  schemas.py     # Pydantic API モデル
  web.py         # FastAPI app / API
  ui.py          # ブラウザ UI

詳しい設計は docs/architecture.md を参照してください。

コマンド

uv run mdlens index [folder]
uv run mdlens app [folder]

主なオプション:

  • --index PATH: index ファイルの保存先を指定します。
  • --refresh: アプリ起動時に index を更新します。
  • --host HOST: 待ち受け host を指定します。既定は 127.0.0.1 です。
  • --port PORT: 待ち受け port を指定します。既定は 8765 です。
  • --no-browser: 起動時にブラウザを開きません。

テスト

uv run --python 3.12 --group dev pytest

詳しくは docs/testing.md を参照してください。

ドキュメント

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdlens-0.1.2.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdlens-0.1.2-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file mdlens-0.1.2.tar.gz.

File metadata

  • Download URL: mdlens-0.1.2.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mdlens-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ff60bb776cac6e166dbd4fc00b6cc5f179caa1f9b2bf61f2609ec55f9fd2f50
MD5 6236eb1478a4ce5e66c5b46f87685da2
BLAKE2b-256 1dfc51aa95679f94ae7ca1e69d3fd39b48d7424748d5377d76e7dd156ad43dff

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdlens-0.1.2.tar.gz:

Publisher: publish.yml on 3pintea/MdLens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mdlens-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mdlens-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mdlens-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 394395fb60acef32b0de475f4b28467828c6edefa0fa0a41c4fd555d5167cfc9
MD5 1eb78002af704c227db0fd7054399a98
BLAKE2b-256 1541c72cd2c87d6a6f80320ffb9e583577ff3e3de02b067dd6481cd223dc4c81

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdlens-0.1.2-py3-none-any.whl:

Publisher: publish.yml on 3pintea/MdLens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page