Skip to content

Commit

Permalink
kobo
Browse files Browse the repository at this point in the history
  • Loading branch information
karlicoss committed Oct 18, 2023
1 parent 32c26e8 commit 50a8a12
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/bleanser/modules/hpi/hypothesis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path
from typing import Any, Iterator

Expand Down
33 changes: 33 additions & 0 deletions src/bleanser/modules/hpi/kobo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pathlib import Path
from typing import Any, Iterator

from bleanser.core.modules.extract import ExtractObjectsNormaliser

from my.core.cfg import tmp_config
import my.kobo


class Normaliser(ExtractObjectsNormaliser):
def extract_objects(self, path: Path) -> Iterator[Any]:
class config:
class kobo:
export_path = path

with tmp_config(modules=my.kobo.__name__, config=config):
assert len(my.kobo.DATABASES) == 1
yield from []

yield from my.kobo._iter_highlights()
# iter_highlights
# iter_events
#
## sanity check to make sure tmp_config worked as expected
# for most modules should be able to use module.inputs() directly though
# dal = my.hypothesis._dal()
# assert len(dal.sources) == 1
##
# yield from my.hypothesis.highlights()


if __name__ == '__main__':
Normaliser.main()

0 comments on commit 50a8a12

Please sign in to comment.