docs: add docs for google_takeout_parser

This commit is contained in:
Sean Breckenridge 2022-04-24 18:10:56 -07:00 committed by karlicoss
parent 78f6ae96d1
commit 66a00c6ada
2 changed files with 42 additions and 21 deletions

View file

@ -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]]

View file

@ -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'