Metadata-Version: 2.5
Name: qnx-slog-inspector
Version: 0.1.0
Summary: Streaming QNX and slog analyser with grouped Markdown reports
Project-URL: Homepage, https://github.com/ganeshredcobra/qnx-slog-inspector
Project-URL: Issues, https://github.com/ganeshredcobra/qnx-slog-inspector/issues
Author: Ganesh Harshan
License: MIT License
        
        Copyright (c) 2026 Ganesh Harshan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: log-analysis,qnx,slog
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
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 :: Debuggers
Classifier: Topic :: System :: Logging
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# qnx-slog-inspector

A dependency-free, streaming Python library and CLI for analysing large QNX slog text files. Findings are de-duplicated and grouped by program name in a collapsible Markdown report.

> Independent project. Not affiliated with or endorsed by QNX Software Systems or their affiliates.

## Installation

```bash
pip install qnx-slog-inspector
```

## CLI

```bash
qnx-slog-inspector slog_new.log -o report.md
```

## Python API

```python
from slog_analyser import SlogAnalyser, write_markdown

analyser = SlogAnalyser()
result = analyser.analyse_file("slog_new.log")
write_markdown(result, "report.md")

for program, findings in result.by_program().items():
    print(program, sum(item.count for item in findings))
```

Custom detection rules can be added without modifying the package:

```python
rules = [("gpu_fault", "Critical", r"\bGPU fault\b|\bchannel reset\b")]
result = SlogAnalyser(extra_rules=rules).analyse_file("slog.log")
```

## Development

```bash
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip build twine pytest
python -m pytest
python -m build
python -m twine check dist/*
```

## Test publishing

```bash
python -m twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ qnx-slog-inspector
```

## Production publishing

```bash
python -m twine upload dist/*
```

Use a PyPI API token when prompted. Do not commit tokens to Git.

## License

MIT, copyright 2026 Ganesh Harshan.
