Metadata-Version: 2.4
Name: miscreaders
Version: 0.2.1
Summary: Parsers for output of various programs
Project-URL: Homepage, https://github.com/tkarabela/miscreaders
Project-URL: Repository, https://github.com/tkarabela/miscreaders.git
Project-URL: Issues, https://github.com/tkarabela/miscreaders/issues
Project-URL: Documentation, https://miscreaders.readthedocs.io
Author-email: Tomas Karabela <tkarabela@seznam.cz>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: Loop Habits Tracker,Moonwatch.rs,StayFree
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: File Formats
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: polars~=1.26
Requires-Dist: xlrd~=2.0
Provides-Extra: docs
Requires-Dist: sphinx-rtd-theme~=3.0; extra == 'docs'
Requires-Dist: sphinx~=8.1; extra == 'docs'
Description-Content-Type: text/markdown

[![CI - build](https://img.shields.io/github/actions/workflow/status/tkarabela/miscreaders/main.yml?branch=master)](https://github.com/tkarabela/miscreaders/actions)
[![CI - coverage](https://img.shields.io/codecov/c/github/tkarabela/miscreaders)](https://app.codecov.io/github/tkarabela/miscreaders)
[![MyPy & Ruffle checked](https://img.shields.io/badge/MyPy%20%26%20Ruffle-checked-blue?style=flat)](https://github.com/tkarabela/pysubs2/actions)
![PyPI - Version](https://img.shields.io/pypi/v/miscreaders.svg?style=flat)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/miscreaders.svg?style=flat)
![License](https://img.shields.io/pypi/l/miscreaders.svg?style=flat)

# miscreaders

This library provides parsers for output of various programs.

To learn more, please [see the documentation](https://miscreaders.readthedocs.io).

## List of readers

| Program                                                   | Description                                        |
|-----------------------------------------------------------|----------------------------------------------------|
| [StayFree](https://stayfreeapps.com/)                     | Device usage statistics (mobile, desktop, browser) |
| [Loop Habit Tracker](https://github.com/iSoron/uhabits)   | Habit tracker (Android)                            |
| [Moonwatch.rs](https://github.com/tkarabela/moonwatch-rs) | Privacy-focused device usage statistics (desktop)  |

## Installation

```bash
pip install miscreaders
```

## Example

```python
>>> from miscreaders.stayfree import StayfreeXlsReader
>>> reader = StayfreeXlsReader("StayFree Export - Total Usage - 8_9_24.xls")
>>> reader.get_usage_time_df()
shape: (6_222, 4)
┌────────────┬─────────────┬──────────────┬────────┐
│ date       ┆ app         ┆ duration     ┆ device │
│ ---        ┆ ---         ┆ ---          ┆ ---    │
│ date       ┆ str         ┆ duration[μs] ┆ str    │
╞════════════╪═════════════╪══════════════╪════════╡
│ 2023-11-10 ┆ addititious ┆ 0µs          ┆        │
│ 2023-11-11 ┆ addititious ┆ 0µs          ┆        │
│ 2023-11-12 ┆ addititious ┆ 0µs          ┆        │
│ 2023-11-13 ┆ addititious ┆ 0µs          ┆        │
│ 2023-11-14 ┆ addititious ┆ 6s           ┆        │
│ …          ┆ …           ┆ …            ┆ …      │
│ 2024-03-06 ┆ xylometer   ┆ 53m 8s       ┆        │
│ 2024-03-07 ┆ xylometer   ┆ 0µs          ┆        │
│ 2024-03-08 ┆ xylometer   ┆ 30m 54s      ┆        │
│ 2024-03-09 ┆ xylometer   ┆ 0µs          ┆        │
│ 2024-03-10 ┆ xylometer   ┆ 0µs          ┆        │
└────────────┴─────────────┴──────────────┴────────┘
```

## License

MIT, see [LICENSE.txt](./LICENSE.txt).
