Skip to content

Commit

Permalink
Merge pull request #375 from abrignoni/Brigs-working
Browse files Browse the repository at this point in the history
Google Voice Temp Audio Guidance
  • Loading branch information
abrignoni authored Apr 27, 2023
2 parents 3abd8f0 + 24b1fa0 commit 782fb3f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions scripts/artifacts/googlemapaudioTemp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from re import fullmatch
from datetime import datetime
from pathlib import Path
from os.path import getsize
import os


from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly, media_to_html

def get_googlemapaudioTemp(files_found, report_folder, seeker, wrap_text):

data_list = []

for file_found in files_found:

name = Path(file_found).name
modified_time = os.path.getmtime(file_found)
file_size = getsize(file_found)
has_data = file_size > 0

if os.path.isdir(file_found) is False:

if has_data :

# Timestamp
utc_modified_date = datetime.utcfromtimestamp(modified_time)

# Audio
audio = media_to_html(file_found, files_found, report_folder)

# Size
file_size_kb = f"{round(file_size / 1024, 2)} kb"

# Artefacts
data_list.append((utc_modified_date,audio,name,file_size))


if len(data_list) > 0:

source_dir = str(Path(file_found).parent)

report = ArtifactHtmlReport('Google Maps Temp Voice Guidance')
report.start_artifact_report(report_folder, 'Google Maps Temp Voice Guidance')
report.add_script()
data_headers = ('Timestamp Modified', 'Audio', 'Name', 'File Size')
report.write_artifact_data_table(data_headers, data_list, source_dir, html_escape=False)
report.end_artifact_report()

tsvname = f'Google Maps Temp Voice Guidance'
tsv(report_folder, data_headers, data_list, tsvname, source_dir)

else:
logfunc('No Google Maps Temp Voice Guidance found')

__artifacts__ = {
"GooglemapaudioT": (
"Google Maps Temp Voice Guidance",
('*/com.google.android.apps.maps/app_tts-temp/**'),
get_googlemapaudioTemp)
}
1 change: 1 addition & 0 deletions scripts/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def get_icon_name(category, artifact):
elif category == 'GOOGLE KEEP': icon = 'list'
elif category == 'GBOARD KEYBOARD': icon = 'edit-3'
elif category == 'GOOGLE MAPS VOICE GUIDANCE': icon = 'map'
elif category == 'GOOGLE MAPS TEMP VOICE GUIDANCE': icon = 'map'
elif category == 'GOOGLE MESSAGES': icon = 'message-circle'
elif category == 'GOOGLE NOW & QUICKSEARCH': icon = 'search'
elif category == 'GOOGLE PHOTOS':
Expand Down

0 comments on commit 782fb3f

Please sign in to comment.