Skip to content

Commit

Permalink
Update de locale (#59)
Browse files Browse the repository at this point in the history
* add additional paths for DE locale
* update folder names
* skip locale check on windows

---------

Co-authored-by: Sean Breckenridge <seanbrecke@gmail.com>
  • Loading branch information
parthux1 and purarue authored Jan 4, 2024
1 parent 6561a6a commit b9e47be
Show file tree
Hide file tree
Showing 143 changed files with 23 additions and 6 deletions.
16 changes: 13 additions & 3 deletions google_takeout_parser/locales/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
r"Chrome": None, # Ignore rest of Chrome stuff
r"Google Play Store/Installs.json": _parse_app_installs,
r"Google Play Store/": None, # ignore anything else in Play Store
r"Standortverlauf/Semantic Location History/.*/.*.json": _parse_semantic_location_history,
r"Standortverlauf/Records.json": _parse_location_history,
r"Location History \(Timeline\)/Semantic Location History/.*/.*.json": _parse_semantic_location_history,
r"Location History \(Timeline\)/Records.json": _parse_location_history,
r"Location History \(Timeline\)/": None, # ignore anything else in Location History
# Youtube
r"YouTube( und YouTube Music)?/Verlauf/.*?.html": _parse_html_activity,
r"YouTube( und YouTube Music)?/Verlauf/.*?.json": _parse_json_activity,
Expand All @@ -31,30 +32,39 @@
r"Meine Aktivitäten/.*?Meine\s*Aktivitäten.html": None,
r"Meine Aktivitäten/.*?Meine\s*Aktivitäten.json": _parse_json_activity,
# Ignored Google Services
r"Google Fit": None,
r"Google Play-Spieldienste/": None,
r"Google Developers/": None,
r"Google Play/": None,
r"Google Pay": None,
r"Google Finanzen/": None, # stock watchlist
r"Home App/": None,
r"Google Shopping": None,
r"Google Workspace Marketplace": None,
r"Google Play Filme _ Serien/": None,
r"Google Play Bücher/": None, # books
r"Google News/": None,
r"Discover/": None,
r"Google Kontakte/": None,
r"Gmail/": None,
r"Google Shopping": None,
r"Google Unternehmensprofil/": None,
r"Google Fotos/": None,
r"Gespeichert/": None,
r"Google Chat/": None,
r"Business Messages/": None,
r"Classroom/": None,
r"Google-Konto/": None,
r"Google-Hilfe-Communities/": None,
r"Kalender/": None,
r"Maps (Meine Orte)/": None,
r"Aufgaben/": None,
r"Maps \(Meine Orte\)/": None,
r"Maps/": None,
r"Profil/": None,
r"Groups/": None,
r"Drive/": None,
r"Zugriffsprotokollaktivitäten/": None,
r"Search Contributions/": None,
r"Android-Gerätekonfigurationsdienst/": None,
r"Archiv_Übersicht.html": None, # description of takeout, not that useful
}
4 changes: 2 additions & 2 deletions tests/test_google_takeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_structure_ger() -> None:
files = [f for f in recent_takeout.rglob("*") if f.is_file()]
tk = TakeoutParser(recent_takeout, locale_name="de")
m = tk.dispatch_map()
assert len(files) == 51
assert len(m) == 7
assert len(files) == 148
assert len(m) == 19

assert tk._guess_locale(takeout_dir=tk.takeout_dir) == [LOCALES["DE"]]
9 changes: 8 additions & 1 deletion tests/test_locale_paths.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import os

import pytest
from google_takeout_parser.locales.main import get_paths_for_functions


@pytest.mark.skipif(
os.environ.get("RUNNER_OS", "Linux") == "Windows",
reason="skipping locale test on windows, some quoting issue",
)
def test_locale_paths() -> None:
jpths = get_paths_for_functions()
assert jpths == [
"Chrome",
"Location History",
r"Location History \(Timeline\)", # using "Location History \\(Timeline\\)" fails on windows.
"Meine Aktivitäten",
"My Activity",
"Standortverlauf",
"YouTube( and YouTube Music)?",
"YouTube( und YouTube Music)?",
]
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit b9e47be

Please sign in to comment.