diff --git a/doc/MODULES.org b/doc/MODULES.org index a160ecb..e4bcdad 100644 --- a/doc/MODULES.org +++ b/doc/MODULES.org @@ -118,17 +118,17 @@ import importlib # from lint import all_modules # meh # TODO figure out how to discover configs automatically... modules = [ - ('google' , 'my.google.takeout.paths'), - ('hypothesis' , 'my.hypothesis' ), - ('pocket' , 'my.pocket' ), - ('twint' , 'my.twitter.twint' ), - ('twitter_archive', 'my.twitter.archive' ), - ('lastfm' , 'my.lastfm' ), - ('polar' , 'my.polar' ), - ('instapaper' , 'my.instapaper' ), - ('github' , 'my.github.gdpr' ), - ('github' , 'my.github.ghexport' ), - ('kobo' , 'my.kobo' ), + ('google' , 'my.google.takeout.parser'), + ('hypothesis' , 'my.hypothesis' ), + ('pocket' , 'my.pocket' ), + ('twint' , 'my.twitter.twint' ), + ('twitter_archive', 'my.twitter.archive' ), + ('lastfm' , 'my.lastfm' ), + ('polar' , 'my.polar' ), + ('instapaper' , 'my.instapaper' ), + ('github' , 'my.github.gdpr' ), + ('github' , 'my.github.ghexport' ), + ('kobo' , 'my.kobo' ), ] def indent(s, spaces=4): @@ -164,13 +164,29 @@ for cls, p in modules: #+RESULTS: -** [[file:../my/google/takeout/paths.py][my.google.takeout.paths]] +** [[file:../my/google/takeout/parser.py][my.google.takeout.parser]] - Module for locating and accessing [[https://takeout.google.com][Google Takeout]] data + Parses Google Takeout using [[https://github.com/seanbreckenridge/google_takeout_parser][google_takeout_parser]] + + See [[https://github.com/seanbreckenridge/google_takeout_parser][google_takeout_parser]] for more information about how to export and organize your takeouts + + If the =DISABLE_TAKEOUT_CACHE= environment variable is set, this won't + cache individual exports in =~/.cache/google_takeout_parser= + + The directory set as takeout_path can be unpacked directories, or + zip files of the exports, which are temporarily unpacked while creating + the cachew cache #+begin_src python - class google: - takeout_path: Paths # path/paths/glob for the takeout zips + class google(user_config): + # directory which includes unpacked/zipped takeouts + takeout_path: Paths + + error_policy: ErrorPolicy = 'yield' + + # experimental flag to use core.kompress.ZipPath + # instead of unpacking to a tmp dir via match_structure + _use_zippath: bool = False #+end_src ** [[file:../my/hypothesis.py][my.hypothesis]] diff --git a/my/google/takeout/parser.py b/my/google/takeout/parser.py index 94ac876..a6ea81c 100644 --- a/my/google/takeout/parser.py +++ b/my/google/takeout/parser.py @@ -1,10 +1,15 @@ """ -Parses my Google Takeout using https://github.com/seanbreckenridge/google_takeout_parser +Parses Google Takeout using [[https://github.com/seanbreckenridge/google_takeout_parser][google_takeout_parser]] -can set DISABLE_TAKEOUT_CACHE as an environment -variable to disable caching for individual exports -in ~/.cache/google_takeout_parser - see https://github.com/seanbreckenridge/google_takeout_parser +See [[https://github.com/seanbreckenridge/google_takeout_parser][google_takeout_parser]] for more information +about how to export and organize your takeouts + +If the DISABLE_TAKEOUT_CACHE environment variable is set, this won't cache individual +exports in ~/.cache/google_takeout_parser + +The directory set as takeout_path can be unpacked directories, or +zip files of the exports, which are temporarily unpacked while creating +the cachew cache """ REQUIRES = ["git+https://github.com/seanbreckenridge/google_takeout_parser"] @@ -31,7 +36,7 @@ from my.config import google as user_config @dataclass class google(user_config): - # directory to unzipped takeout data + # directory which includes unpacked/zipped takeouts takeout_path: Paths error_policy: ErrorPolicy = 'yield'