Skip to main content

A lightweight browser-based Markdown reader.

Project description

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

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 を参照してください。

ドキュメント

Project details


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.1.tar.gz (33.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.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdlens-0.1.1.tar.gz
  • Upload date:
  • Size: 33.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.1.tar.gz
Algorithm Hash digest
SHA256 8743d5bb65772854f90a5c72641319b1dd7ab4c686e61425eeeb2edb3f999a60
MD5 4e4557f09ca444c8a835719823a48466
BLAKE2b-256 ab1493cd9b7ac5139503f201c495d38ff822095da6871488a987b2c90066aa07

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdlens-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: mdlens-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 238493bba80ad805fe36cb9a4a75c4e30c9d51a3faf7286fea27a464fd1ba630
MD5 572a51079183458e6c90964e98ac2c33
BLAKE2b-256 aaff6d95617c956defbb744dd31d1a784943f798f83aa27442ac3b0871ef574d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdlens-0.1.1-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.

Supported by

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