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
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 を参照してください。
ドキュメント
- docs/architecture.md: アプリ構成
- docs/testing.md: pytest 実行方法
- docs/publishing.md: PyPI / TestPyPI publishing guide
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ff60bb776cac6e166dbd4fc00b6cc5f179caa1f9b2bf61f2609ec55f9fd2f50
|
|
| MD5 |
6236eb1478a4ce5e66c5b46f87685da2
|
|
| BLAKE2b-256 |
1dfc51aa95679f94ae7ca1e69d3fd39b48d7424748d5377d76e7dd156ad43dff
|
Provenance
The following attestation bundles were made for mdlens-0.1.2.tar.gz:
Publisher:
publish.yml on 3pintea/MdLens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdlens-0.1.2.tar.gz -
Subject digest:
4ff60bb776cac6e166dbd4fc00b6cc5f179caa1f9b2bf61f2609ec55f9fd2f50 - Sigstore transparency entry: 1391951577
- Sigstore integration time:
-
Permalink:
3pintea/MdLens@2f403a7291becf5c5103da9e6b6224a9704848e5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/3pintea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f403a7291becf5c5103da9e6b6224a9704848e5 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
394395fb60acef32b0de475f4b28467828c6edefa0fa0a41c4fd555d5167cfc9
|
|
| MD5 |
1eb78002af704c227db0fd7054399a98
|
|
| BLAKE2b-256 |
1541c72cd2c87d6a6f80320ffb9e583577ff3e3de02b067dd6481cd223dc4c81
|
Provenance
The following attestation bundles were made for mdlens-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on 3pintea/MdLens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdlens-0.1.2-py3-none-any.whl -
Subject digest:
394395fb60acef32b0de475f4b28467828c6edefa0fa0a41c4fd555d5167cfc9 - Sigstore transparency entry: 1391951615
- Sigstore integration time:
-
Permalink:
3pintea/MdLens@2f403a7291becf5c5103da9e6b6224a9704848e5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/3pintea
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f403a7291becf5c5103da9e6b6224a9704848e5 -
Trigger Event:
release
-
Statement type: