How to import Google Photos into PhotoStructure
If you’d like to take the photos and videos that you have in your Google Photos account and import them into your own PhotoStructure library, the best way to do that is with a Google Takeout.
Step 1: Create a new “export” đ
-
First, open https://takeout.google.com/.
If you have multiple Google Accounts, make sure you’ve selected your correct account in the upper-right corner of the screen.
-
All Google products will be selected, but we just want your Google Photos, so click the “Deselect all” button.
-
Then scroll (about half-way) down to Google Photos and click the checkbox:
-
Scroll to the bottom of the page, and click “Next step.”
-
In the “Choose file type, frequency, and destination” section, pick “Export once”.
For file type: if your Google Photos library is large (> 100GB), you should use
.tgz
. Windows users can use the free software 7zip to decompress these archives (but always check any installer for viruses first!For size: know that larger archives are more convenient, but have a higher chance of failing due to network hiccups. On a residential cable network rated at 600Mb/s, I found that 50 GB archives failed often enough to resort to 10 GB archives.
-
After you click “Create export,” expect to wait many hours (or days!) before the archive is ready.
Step 2: Download the export đ
You’ll receive an email once your archive is ready. I found the Takeout site didn’t work well with Firefox: you may have better luck with Chrome.
You may find that your downloads fail halfware through if you fetch more than a handful of archives simultaneously. For reference, my residential cable modem worked find with 5-8 simultaneous downloads, but had failures with more than 15 simultaneous downloads. Your mileage may vary.
Step 3: Decompress the export đ
Google Photos archives may split your albums across several .zip
or .tgz
files, so only portions of the files or metadata will be available if you only look at one .zip
or .tgz
file at a time.
The solution is to decompress all the archives into a single common directory.
Simple way: actually decompress the contents đ
On Linux, open a terminal in the directory that contains all the takeout-XXXX.tgz
files, and run:
for i in takeout*.tgz ; do tar xzf $i ; done
Fancy way: use ratarmount
đ
Rather than using up twice the disk space to extract all the files in your takeout, you can use ratarmount to “virtually decompress” your archives.
After installing ratarmount, open a terminal in the directory that contains all the takeout-XXXX.tgz
files, and run:
ratarmount --strip-recursive-tar-extension --recursive *.tgz ~/Takeout
This command will take a bit to read through the TAR files, but when it completes, a “virtual” directory (in the above example, ~/Takeout
), will contain all the photos and videos in your Takeout (and not use any extra disk space!)
See this comment thread for more information.
Step 4: Point PhotoStructure at your archive đ
Open the settings page, and add the Takeout
directory that you just extracted (or mounted) to the “scan paths” section, and click Save
. PhotoStructure will then import your Google Photos.
Extra credit: Name parsing đ
PhotoStructure (as of v1.0) has extensively configurable name parsing.
Read more about how to override these defaults either via settings.toml
or via the environment.
You may want to change the setting tagNamesFormatter
from the default of as-is
to family/given
, but check the description below.
Note that you’ll need to rebuild your library, or force-resync any affected assets if you change any of these settings after initial imports.
Tip: use info
to test out your settings đ
If you want to see how PhotoStructure will parse the names in your files, you can use the info
tool to try out different settings:
tagNamesFormatter=as-is ./photostructure info path/to/image.jpg --filter tags
versus
tagNamesFormatter=family/given ./photostructure info path/to/image.jpg --filter tags
for example, to see how the family/given
parser will split up names.
settings.toml name parsing settings đ
(as of August, 2021)
# +-------------------------------+
# | tagNamesCapitalizedAsFamily |
# +-------------------------------+
#
# Assume uppercased names are family names (this is common practice in
# geneology).
#
# environment: "PS_TAG_NAMES_CAPITALIZED_AS_FAMILY"
#
tagNamesCapitalizedAsFamily = true
# +-------------------------+
# | tagNamesDefaultFamily |
# +-------------------------+
#
# If a name is missing a family name, if this value is not blank, it will be
# provided as a default. If this value is blank, the name tag will be
# Who/given. Note that this setting is only used if "tagNamesFormatter" is set
# to "family/given".
#
# environment: "PS_TAG_NAMES_DEFAULT_FAMILY"
#
tagNamesDefaultFamily = "-"
# +---------------------------+
# | tagNamesFamilySurrounds |
# +---------------------------+
#
# This setting contains pairs of characters. When name portions are surrounded
# by these pairs, the contents will be added as a family name. As an example,
# if you use the default "()", then "Michelle LaVaughn (Robinson) Obama" will
# be name tagged with both "Who/Robinson/Michelle LaVaughn" and
# "Who/Obama/Michell LaVaugn". This setting is used by the "tagNamesFormatter"
# if it is set to "family/given".
#
# environment: "PS_TAG_NAMES_FAMILY_SURROUNDS"
#
tagNamesFamilySurrounds = [
"()"
]
# +---------------------+
# | tagNamesFormatter |
# +---------------------+
#
# How should PhotoStructure format the "Who" tags for assets whose files are
# tagged with "people" strings?
#
# "as-is" will tag names directly to "Who", so, "Who/Albert Einstein".
#
# "family/given" will tag "Who/Einstein/Albert" (for regions that provide
# given names first). The default is "as-is," because discerning given and
# family names aren't reliably inferable.
#
# See <https://en.wikipedia.org/wiki/Personal_name#Name_order>.
#
# environment: "PS_TAG_NAMES_FORMATTER"
# validValues: "as-is" or "family/given"
#
tagNamesFormatter = "as-is"
# +-----------------+
# | tagNamesGiven |
# +-----------------+
#
# List all given names you expect in tags that are not single words.
# Hyphenated given names (like "Rose-Ann") do not need to be listed here. If
# your language doesn't separate family names and given names with whitespace,
# either include all given names, or include all familyNames (whatever's
# easier for you). This setting is used by the "tagNamesFormatter" if it is
# set to "family/given".
#
# environment: "PS_TAG_NAMES_GIVEN"
#
tagNamesGiven = []
# +--------------------------+
# | tagNamesGivenSurrounds |
# +--------------------------+
#
# This setting contains pairs of characters. When name portions are surrounded
# by these pairs, the contents will be added to the end of the given name with
# the surrounds retained. As an example, if you use the defaults of "[]" and
# double-quotes, then "Joe "Joey" Smith" will be name tagged with
# Who/Smith/Joe "Joey". This setting is used by the "tagNamesFormatter" if it
# is set to "family/given".
#
# environment: "PS_TAG_NAMES_GIVEN_SURROUNDS"
#
tagNamesGivenSurrounds = [
"[]",
"\"\""
]
# +-------------------+
# | tagNamesLexical |
# +-------------------+
#
# Assume any name with a comma is in "lexical name order", which is always
# "lastname, given name(s)". If the given name is found to be "sr.", "senior",
# "jr.", or "junior", the name will be considered to be in western order
# ($givenNames $familyName, $modifier), and the $modifier will be added to the
# $givenNames. If this is set to false, commas are ignored.
#
# environment: "PS_TAG_NAMES_LEXICAL"
#
tagNamesLexical = true
# +-----------------+
# | tagNamesOrder |
# +-----------------+
#
# How should PhotoStructure parse people's names? Note that this setting is
# only used if "tagNamesFormatter" is set to "family/given". See
# <https://en.wikipedia.org/wiki/Personal_name#Name_order>.
#
# environment: "PS_TAG_NAMES_ORDER"
# validValues: "western" or "eastern"
#
tagNamesOrder = "western"
# +---------------------------+
# | tagNamesSurnamePrefixes |
# +---------------------------+
#
# List all family name prefixes to be considered part of the family name.
# These are matched case-insensitively. This setting is used by the
# "tagNamesFormatter" if it is set to "family/given".
#
# environment: "PS_TAG_NAMES_SURNAME_PREFIXES"
#
tagNamesSurnamePrefixes = [
"A",
"Dâ",
"Da",
"De la",
"De las",
"De",
"Del",
"Della",
"Den",
"Des",
"Di",
"Du",
"La",
"Las",
"Le",
"Li",
"Lo",
"Mc",
"Mac",
"op de",
"ten",
"ter",
"Van ât",
"van der",
"van",
"von der",
"von",
"z",
"zu"
]
# +--------------------+
# | tagNamesSurnames |
# +--------------------+
#
# List all family names you expect in tags that are not single words that are
# found at the end of a tagged name. Hyphenated family names (like
# "Ocasio-Cortez") do not need to be listed here: only compound family names,
# and if your language doesn't separate family names with whitespace. In the
# latter case, either include all family names, or include all givenNames
# (whatever's easier for you). This setting is used by the "tagNamesFormatter"
# if it is set to "family/given".
#
# environment: "PS_TAG_NAMES_SURNAMES"
#
tagNamesSurnames = []
Questions? Comments? Ask in the forum!