google takeout: support multiple locales

uses the known locales in google_takeout_parser
to determine the expected paths for each locale,
and performs a partial match on the paths to
detect and use match_structure
This commit is contained in:
Sean Breckenridge 2023-12-30 16:52:14 -08:00 committed by karlicoss
parent 1b187b2c1b
commit 93e475795d

View file

@ -64,13 +64,19 @@ def inputs() -> Sequence[Path]:
return get_files(config.takeout_path) return get_files(config.takeout_path)
EXPECTED = ( try:
"My Activity", from google_takeout_parser.locales.main import get_paths_for_functions
"Chrome",
"Location History", EXPECTED = tuple(get_paths_for_functions())
"Youtube",
"YouTube and YouTube Music", except ImportError:
) EXPECTED = (
"My Activity",
"Chrome",
"Location History",
"Youtube",
"YouTube and YouTube Music",
)
google_takeout_version = str(getattr(google_takeout_parser, '__version__', 'unknown')) google_takeout_version = str(getattr(google_takeout_parser, '__version__', 'unknown'))