cppmanlite 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: cppmanlite
3
+ Version: 0.1.0
4
+ Summary: Lightweight serverless C++ documentation lookup — pure Python, no C deps
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://dive4dec.github.io/cppmanlite/
7
+ Project-URL: Repository, https://github.com/dive4dec/cppmanlite
8
+ Keywords: cpp,cplusplus,cppreference,documentation,cppman
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Education
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: Implementation :: CPython
16
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
17
+ Classifier: Topic :: Software Development :: Documentation
18
+ Classifier: Topic :: Utilities
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ # cppmanlite
27
+
28
+ Lightweight serverless C++ documentation lookup — a pure Python package and
29
+ static site powered by [cppreference.com](https://en.cppreference.com).
30
+
31
+ ## Features
32
+
33
+ - **Pure Python** — no C dependencies, works in CPython, Pyodide, Jupyter
34
+ - **Static site** — served from GitHub Pages or any static host
35
+ - **Client-side search** — lunr.js fuzzy search over a ~1MB index
36
+ - **On-demand page loading** — fetches from cppreference.com or local bundle
37
+ - **Auto-updating** — GitHub Action refreshes the index monthly
38
+ - **Kubernetes-ready** — Helm chart included for `/cppmanlite` route
39
+
40
+ ## Python package
41
+
42
+ ```bash
43
+ pip install cppmanlite
44
+ ```
45
+
46
+ ```python
47
+ import cppmanlite
48
+
49
+ # Search for C++ documentation
50
+ cppmanlite.search("vector")
51
+ # [{'title': 'std::vector', 'url': 'cpp/container/vector.html', ...}, ...]
52
+
53
+ # Display a page (renders HTML in Jupyter, plain text in terminal)
54
+ cppmanlite.man("std::vector")
55
+
56
+ # Alias
57
+ cppmanlite.help("sort")
58
+ ```
59
+
60
+ Works in [Pyodide](https://pyodide.org) (Python in the browser) — no compiled
61
+ dependencies required.
62
+
63
+ ## Static site
64
+
65
+ The `site/` directory contains a standalone search UI:
66
+
67
+ - `index.html` — search box + results + page reader
68
+ - `app.js` — lunr.js search + on-demand page fetching
69
+ - `style.css` — dark/light theme
70
+
71
+ Deployed to GitHub Pages at: **https://dive4dec.github.io/cppmanlite/**
72
+
73
+ ## Docker / Kubernetes
74
+
75
+ ```bash
76
+ docker build -t cppmanlite:v1 .
77
+ ```
78
+
79
+ Multi-stage build: downloads the cppreference HTML archive, strips boilerplate,
80
+ builds a search index, and serves everything via nginx.
81
+
82
+ ```bash
83
+ helm install cppmanlite ./chart -n cppmanlite
84
+ ```
85
+
86
+ Serves at `https://socratic.cs.cityu.edu.hk/cppmanlite/`
87
+
88
+ ## How it works
89
+
90
+ 1. **Index building** (`scripts/build_index.py`): Downloads the cppreference
91
+ HTML book archive, extracts page titles + snippets, fixes relative URLs,
92
+ and writes a compact JSON index (~1.2MB for 6,000+ pages).
93
+
94
+ 2. **Search**: lunr.js builds a client-side full-text search index from the
95
+ JSON. Results show title, URL path, and a content snippet.
96
+
97
+ 3. **Page reading**: When a user clicks a result, the reader fetches the page
98
+ — either from a local `docs/` bundle (Docker/K8s deployment) or directly
99
+ from cppreference.com (GitHub Pages).
100
+
101
+ 4. **Auto-update**: A GitHub Action runs monthly, downloads the latest
102
+ cppreference archive, rebuilds the index, and deploys to GitHub Pages.
103
+
104
+ ## Data source
105
+
106
+ Documentation from [cppreference.com](https://en.cppreference.com), licensed
107
+ under CC-BY-SA 3.0 / GFDL. The HTML book archive is published by
108
+ [PeterFeicht/cppreference-doc](https://github.com/PeterFeicht/cppreference-doc).
109
+
110
+ ## License
111
+
112
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,8 @@
1
+ cppmanlite/__init__.py,sha256=s1fKiT1u8yGOjIFXzmoBCvD-4zSNyeAA7jfzlN4Jtus,677
2
+ cppmanlite/core.py,sha256=fx_K4eDi-wqDQz0UlK87QV7unW1DpBOOjM1v-0brmg8,9327
3
+ cppmanlite/data/index.json,sha256=ErhTI8HTwsg48nmtOUd7c-oQYYf5J7MkY9i7OrFRdb0,1320331
4
+ cppmanlite-0.1.0.dist-info/licenses/LICENSE,sha256=l2oOhGEO85UPMUiHAgK3C4t3OP8J2KMTQ5FuKFwSVmg,1065
5
+ cppmanlite-0.1.0.dist-info/METADATA,sha256=qHPbrlKCEwECcplv92uXqxWT15HngUJlDu20TPgH81s,3701
6
+ cppmanlite-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
7
+ cppmanlite-0.1.0.dist-info/top_level.txt,sha256=-bCcaOyJMo5gnAKJ1i1l_eaLeK20NnVsHG_4K3YZ7Dw,11
8
+ cppmanlite-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dive4dec
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ cppmanlite