Commit graph

20 commits

Author SHA1 Message Date
purarue
f1d23c5e96 smscalls: allow large XML files as input
once XML files increase past a certain size
(was about 220MB for me), the parser just throws
an error because the tree is too large (iirc for
security reasons)

could maybe look at using iterparse in the future
to parse it without loading the whole file, but this
seems to fix it fine for me
2024-12-28 21:46:28 +00:00
purarue
d8c53bde34 smscalls: add phone number to model 2024-11-26 21:53:52 +00:00
purarue
a7f05c2cad doc: spelling fixes 2024-11-26 21:51:40 +00:00
Dima Gerasimov
8496d131e7 general: migrate modules to use 3.9 features 2024-10-19 23:41:22 +01:00
Dima Gerasimov
9fd4227abf ruff: enable RET/PIE/PLW 2024-08-28 04:06:32 +01:00
Dima Gerasimov
c08ddbc781 general: small updates for typing while trying out pyright 2024-08-28 04:06:32 +01:00
Dima Gerasimov
c45c51af22 core.common: move stats-related stuff to my.core.stats and add more thorough tests/docs
deprecate core.common.stat and core.common.Stats with backwards compatibility
2024-08-16 10:22:29 +01:00
seanbreckenridge
35dd5d82a0
smscalls: parse mms from smscalls export (#370)
* initial mms exploration
2024-06-05 22:03:03 +01:00
Dima Gerasimov
c34656e8fb general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
Sean Breckenridge
82bc51d9fc smscalls: make checking for keys stricter
sort of reverts #287, but also makes some other improvements

this allows us to remove some of the Optional's to
make downstream consumers easier to write. However,
this keeps the return type as a Res (result, with errors),
so downstream consumers will have to handle those incase
the schema ever changes (highly unlikely)

also added the 'call_type/message_type' with a comment
there describing the values

I left 'who' Optional I believe it actually should be -
its very possible for there to be no contact name, added
a check incase its '(Unknown)' which is what my phone
sets it to
2023-04-15 17:17:02 +01:00
Sean Breckenridge
02c738594f smscalls: make some fields optional, yield errors
reflects the new types-lxml package
https://github.com/abelcheung/types-lxml
2023-04-14 23:50:26 +01:00
Sean Breckenridge
b64a11cc69
smscalls: allow multiple backup dirs (#172)
* smscalls: allow multiple backup dirs
* add smscalls to my.config, add test to CI
2021-05-14 01:35:36 +01:00
Sean Breckenridge
014494059d smscalls: add REQUIRES block to install lxml 2021-05-10 19:51:20 +01:00
Sean Breckenridge
fb9426d316 smscalls: add config block
so that don't have to infer what
to set in your hpi config based
on usage in module
2021-03-15 03:48:42 +00:00
Sean Breckenridge
44b756cc6b smscalls: use stdlib for tz, attach readable date
pytz is overkill for this, use the builin
datetime.timezone module (since py ver 3.2)

attach the readable datetime
like 'Sep 12, 2020 9:12:19 AM' to each
of the calls/messages
2020-10-02 19:11:48 +02:00
Sean Breckenridge
160582b6cf parse sms messages from xml files 2020-10-02 19:11:48 +02:00
Dima Gerasimov
9d5d368891 get rid of unnecessary .init imports 2020-05-06 22:05:16 +01:00
Dima Gerasimov
e5b3a1e91e use my.config instead of mycfg; minor cleanups and docstrings 2020-04-12 00:22:10 +01:00
Dima Gerasimov
3018807e2a prettify calls provider 2020-03-06 19:06:17 +00:00
Dima Gerasimov
348460a83d move smscalls from private 2020-03-06 18:46:22 +00:00
Renamed from calls/__init__.py (Browse further)