C
This is a battery history analyZer for android and compatible systems.
The package includes library functions for extracting battery data from collections of CSV files, as well as a helper CLI to generate charts from the terminal.
Installing
This is a python 3 package, and requires python 3.5. To install, type in the terminal:
pip3 install c
Configuration
There is nothing to configure in this package, but you must configure your android device to output CSV files in this format:
YYYY-MM-DD,HH.mm,!C,!D,!V,!C2
Special formats are defined as follows:
!C: the capacity ("percentage") of your battery at the time, from 0 to 100.!D: whether your screen was on at the time, asonoroff.!V: the voltage of your battery, in microvolts.4000000means 4V.!C2: the design capacity of the battery at the time.
The device must append a new entry every 10 minutes, specifically, whenever the time's minute mod 10 is 0.
Running
To see all graphs:
$ c overview
To see individual graphs:
$ c that_graph_name # listed in cli.py
To see just the stats:
$ c stats
------------------------------ ------------- ------------ ---------
Last 395 days Last 30 days Last week
Data points 52529 4165 826
Times charged to 100% 24 0 0
Times charged to 90% 72 14 0
Times charged to 80% 185 16 0
Time spent between 20%~80% (%) 94.26 92.29 100.0
Time spent between 45%~58% (%) 41.43 42.3 68.64
Average voltage (V) 3.88 3.91 3.91
Charge events* 2344 134 37
Discharge events* 1305 74 18
Screen on per day (hrs) 7.63 2.63 1.74
- Mondays 7.5 3.17 0.33
- Tuesdays 7.35 1.5 0.83
- Wednesdays 6.81 1.79 0.83
- Thursdays 7.4 3.0 1.67
- Fridays 6.94 2.42 1.52
- Saturdays 8.26 3.9 5.65
- Sundays 9.23 2.72 4.11
------------------------------ ------------- ------------ ---------
If you are developing:
$ python -m c.cli
Name
C is one of the characters in one of my grandparents' names.
LicenSe
This project is licenSed under the GPL v3 licenSe.
Changelog
0.1.0
Add a capacity column.
0.0.6
Save figures only if the figs directory is available.
Fix issue with blank files.
0.0.5
Fix command line when handling 'stats'.
0.0.3
Add an actual command line.
0.0.2
Fix execution in virtual envs with imports in relative paths.
0.0.1
Initial release.
Metadata
Release files for c 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| c-0.1.0.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| c-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.5 kB
Release files / c-0.1.0.tar.gz
| Download URL | c-0.1.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c60adfe5dcd07a7023f53c5f29ba4113e54a9617725db1053c27c51fd6a37082
|
|
BLAKE2b-256 checksum How to use checksums |
fc5f1130c201f3138745970f8de520095a942cdd174e8f84faf04ce77c434d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
|
Release files / c-0.1.0-py3-none-any.whl
| Download URL | c-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec579e31d9bb77cb57948b7e5da0e17ba706967a7e365b11bab14eebde723844
|
|
BLAKE2b-256 checksum How to use checksums |
38b7f394865ab27bc86b7b7638bb285d2cd5579843c8bca7931e77e07ca74eb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
|