Metadata-Version: 2.4
Name: docnet
Version: 0.2.0
Summary: Instant local file documentation — point it at any folder and browse
License: MIT
Project-URL: Homepage, https://github.com/yourname/docnet
Project-URL: Issues, https://github.com/yourname/docnet/issues
Keywords: documentation,markdown,file browser,notes,local
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask>=2.3
Requires-Dist: markdown>=3.4
Dynamic: license-file

# DocNet

Instant local file wiki. Point it at any folder and get a clean, searchable browser for all your files.

```bash
pip install docnet
docnet ~/notes
```

## Features

- **Zero config** — just run it in a directory
- **Multi-filetype** — markdown, code (20+ languages), CSV, JSON, images, PDFs
- **HTML rendering** — `.html` files render live, with a toggle to view source
- **Live reload** — edit a file on disk and the open page refreshes itself
- **Reader mode** — hide the sidebar for a clean, website-like view (`--reader` or the ☰ button)
- **Full-text search** — search filenames and file content with highlighted snippets
- **5 themes** — light, dark, ocean, forest, rose
- **Recent pages** — sidebar tracks what you've visited
- **Quality of life** — copy buttons on code blocks, hover anchors on headings, per-file download
- **Safe** — path traversal protection, never serves files outside the target directory

## Usage

```bash
docnet                        # serve current directory
docnet ~/notes                # serve a specific folder
docnet ~/notes -p 8080        # custom port
docnet ~/notes --host 0.0.0.0 # expose on local network (share with phone etc.)
docnet ~/notes --reader       # start with the sidebar hidden (website-like)
docnet ~/notes --no-browser   # don't auto-open browser
docnet --version
```

## File support

| Type | Extensions |
|------|-----------|
| Markdown | `.md` (with mermaid diagrams) |
| Code | `.py .js .ts .jsx .tsx .rs .go .java .c .cpp .rb .php .swift .kt .sh .css .scss` |
| Web | `.html .htm` (rendered live, with source toggle) |
| Data | `.json .yaml .toml .csv` |
| Images | `.png .jpg .gif .webp .svg` |
| Documents | `.pdf .txt .log` |

## Run from Python

Instead of the CLI, you can launch DocNet from a script:

```python
from docnet import serve

serve("~/notes", port=8080, reader=True)   # blocks until Ctrl+C
```

`serve()` accepts `directory`, `port`, `host`, `reader`, `open_browser`, and `debug`.
Pass `open_browser=False` to skip auto-opening a tab (e.g. headless).

Need the raw Flask app (for gunicorn/uWSGI or tests)? Use the factory:

```python
from docnet import create_app

app = create_app("~/notes")   # a standard Flask app
```

## Home page

If a `Home.md` exists in the directory it's shown on launch. Otherwise an auto-generated index of all files is shown.

## Install from source

```bash
git clone https://github.com/yourname/docnet
cd docnet
pip install -e .
```

## License

MIT
