treymo / google-takeout-helper Goto Github PK
View Code? Open in Web Editor NEWScript processing and organizing Google Takeout data.
License: MIT License
Script processing and organizing Google Takeout data.
License: MIT License
Apple has a new HEIC format that doesn't seem to be supported well on my Ubuntu installation
My goal is to get all my Lists out of Google maps and into Open Street Maps. Which I think means Maps.me on mobile?
Is there instructions on using the script on Windows 10? I've tried typing out some of the commands into Python and it's giving me invalid syntax errors.
Thanks for this! Downloaded this script only to extract attachments from my mbox file. Since I was just using the mail.py utility, I didn't install the requirements for photos.py, however, I had to comment out the import photos
in order for the script to run.
For people in a similar situation, it would be helpful if the program only imported dependencies required for the run. This could be done by removing the imports from the beginning of the script, and import within the methods themselves.
Removed:
import mail
import photos
Changed:
def _maybe_organize_photos_takeout(takeout_dir):
if not takeout_dir:
print('Invalid (or no) Photos takeout archive directory specified. Not '
'extracting photos from archives.')
return
else:
organize_photos = input('Organize Photos takeout archives? y/n: ')
organize_photos = distutils.util.strtobool(organize_photos)
if not organize_photos:
return
import photos
photos.organize_photos_takeout(takeout_dir)
def _maybe_extract_email_attachments(mbox_file_path):
if (mbox_file_path and os.path.isfile(mbox_file_path) and
mbox_file_path.endswith('.mbox')):
answer = input('Extract mailbox attachments? y/n: ')
answer = distutils.util.strtobool(answer)
if answer:
import mail
mail.extract_mail_attachments(mbox_file_path)
else:
print('Invalid (or no) .mbox path specified. Not extracting email '
'attachments.')
Thanks for creating this script. It is a huge help! However I get the following error:
D:\Backups\GoogleFotosTakeoutLine301120\Takeout\GoogleFotos/1980-01-01/1988 Ferie 09.jpg
Error setting creation date from string:
time data '2007:12:28 14:31: 2' does not match format '%Y:%m:%d %H:%M:%S'
Traceback (most recent call last):
File "c:\users\emil\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\emil\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Emil\anaconda3\Scripts\google-photos-takeout-helper.exe_main.py", line 7, in
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main.py", line 356, in main
filter_fun=lambda f: (is_photo(f) or is_video(f))
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main_.py", line 99, in for_all_files_recursive
for_all_files_recursive(file, file_function, folder_function, filter_fun)
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main_.py", line 102, in for_all_files_recursive
file_function(dir, file)
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main_.py", line 274, in fix_metadata
set_creation_date_from_exif(file)
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main_.py", line 241, in set_creation_date_from_exif
set_creation_date_from_str(file, datetime_str)
File "c:\users\emil\anaconda3\lib\site-packages\google_photos_takeout_helper_main_.py", line 226, in set_creation_date_from_str
_os.utime(file, (timestamp, timestamp))
UnboundLocalError: local variable 'timestamp' referenced before assignment
I seem to get this error when the script tries to process photos that I have manually uploaded to Gphotos, rather than those uploaded by my phone automatically. I should mention that i use the --divide-to-dates tag.
Is it possible to include an ignore-errors flag that simply skips photos with incorrect date strings? Alternatively, puts the photos into a non-sorted folder?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.