Metadata-Version: 2.5
Name: xnjk
Version: 0.0.4
Summary: 把目录渲染成缩进树，可直接贴进 README 或缺陷单。
Project-URL: Homepage, https://pypi.org/project/xnjk/
Author-email: lqxnjk <lqxnjk@qq.com>
License: MIT
License-File: LICENSE
Keywords: console,directory,filesystem,listing,tree
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# xnjk

[English](#english) | 中文

把目录渲染成缩进树，可直接贴进 README 或缺陷单。

## 安装

```console
pip install xnjk
```

## 用法

```python
from xnjk import render_tree

print(render_tree("src", n_max_depth=2))
# src/
# ├── pkg/
# │   └── core.py
# └── main.py

render_tree(".", n_show_files=False, n_max_entries=100)
```

## 说明

目录排在文件前，两者都按大小写不敏感排序，跨平台输出稳定。不可读目录记 warning 后跳过，不抛错；符号链接不跟随，循环目录不会把程序挂死；超过 `n_max_entries` 行数停下并标注截断。

## 许可证

MIT

---

<a id="english"></a>
## English

Render a directory as an indented text tree.

## Install

```console
pip install xnjk
```

## Usage

```python
from xnjk import render_tree

print(render_tree("src", n_max_depth=2))
# src/
# ├── pkg/
# │   └── core.py
# └── main.py

render_tree(".", n_show_files=False, n_max_entries=100)
```

## Notes

Directories sort before files, both case-insensitively, so output is stable across platforms. Unreadable directories are logged and skipped; symlinks are not followed, so a loop cannot hang the walk. Output stops at `n_max_entries` with a truncation marker.

## License

MIT
