my.fbmessenger: use pip package
https://github.com/karlicoss/HPI/issues/79
This commit is contained in:
parent
ed4b6c409f
commit
62e1bdc39a
1 changed files with 15 additions and 3 deletions
|
@ -1,14 +1,19 @@
|
||||||
"""
|
"""
|
||||||
Facebook Messenger messages
|
Facebook Messenger messages
|
||||||
|
|
||||||
Uses output for input data [[https://github.com/karlicoss/fbmessengerexport][fbmessengerexport]].
|
Uses the output of [[https://github.com/karlicoss/fbmessengerexport][fbmessengerexport]]
|
||||||
"""
|
"""
|
||||||
|
REQUIRES = [
|
||||||
|
'git+https://github.com/karlicoss/fbmessengerexport',
|
||||||
|
]
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Iterator
|
from typing import Iterator
|
||||||
|
|
||||||
from .common import PathIsh
|
from .core import PathIsh
|
||||||
|
|
||||||
|
import fbmessengerexport.dal as messenger
|
||||||
|
|
||||||
import my.config.repos.fbmessengerexport.dal as messenger
|
|
||||||
from my.config import fbmessenger as config
|
from my.config import fbmessenger as config
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +28,13 @@ def messages() -> Iterator[messenger.Message]:
|
||||||
yield from t.iter_messages()
|
yield from t.iter_messages()
|
||||||
|
|
||||||
|
|
||||||
|
from .core import stat, Stats
|
||||||
|
def stats() -> Stats:
|
||||||
|
return stat(messages)
|
||||||
|
|
||||||
|
|
||||||
|
### vvv not sure if really belongs here...
|
||||||
|
|
||||||
def _dump_helper(model: messenger.DAL, tdir: Path) -> None:
|
def _dump_helper(model: messenger.DAL, tdir: Path) -> None:
|
||||||
for t in model.iter_threads():
|
for t in model.iter_threads():
|
||||||
name = t.name.replace('/', '_') # meh..
|
name = t.name.replace('/', '_') # meh..
|
||||||
|
|
Loading…
Add table
Reference in a new issue