I Thought He Came With You is Robert Ellison’s blog about software, marketing, politics, photography and time lapse.

Please fix phone spam Google!

95% of my incoming calls are now spam. Most of them are some strange pre-recorded Chinese voice with music playing in the background but I occasionally get a free hotel stay as well.

So far Google has rolled out Call Screen. This means I can waste my time watching Google Assistant talk to the spammer. It's way faster not to bother, hang up all calls and delete the voicemails later.

It seems like instead of Call Screen there could be a better way to deal with this.

Firstly, send any call not from someone in my contacts directly to voice mail. This would actually solve a lot of the problem.

Next, for extra credit, run spam detection on the voice mail before sending it to me. If it's two seconds long and blank then just bin it. If it's Chinese with music bin it. Only if it passes the smell test should it appear in my actual voice mail. Google is very good at this for Gmail.

Please!

How to backup Google Photos to Google Drive automatically after July 2019 with Apps Script

Updated on Monday, July 15, 2019

Google Photos backup to Google Drive shutting down in July 2019

Google has decided that backing up your photos via Google Drive is 'confusing' and so Drive based backup is going away this month. I love Google Photos but I don't trust it - I pull everything into Drive and then I stick a monthly backup from there onto an external drive in a fire safe. There is a way to get Drive backup working again using Google Apps Script and the Google Photos API. There are a few steps to follow but it's pretty straightforward - you should only need to change two lines in the script to get this working for your account.

First two caveats to be aware of. Apps Script has a time limit and so it's possible that it could fail if moving a large number of photos. You should get an email if the script ever fails so watch out for that. Secondly and more seriously you could end up with two copies of your photos. If you use Backup and Sync to add photos from Google Drive then these photos will be downloaded from Google Photos by the script and added to Drive again. You need to either upload directly to Google Photos (i.e. from the mobile app or web site) or handle the duplicates in some way.

On to the script. In Google Drive create a new spreadsheet. This is just a host for the script and makes it easy to authorize it to access Google Photos. Select 'Script editor' from the Tools menu to create a new Apps Script project.

In the script editor select 'Libraries...' from the Resources menu. Enter 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF next to 'Add a library' and click add. This will find the Google OAuth2 library Pick the most recent version and click Save.

Select 'Project properties' from the File menu and copy the Script ID (a long sequence of letters and numbers). You'll need this when configuring the Google Photos API.

In a new window open the Google API Console, part of the Google Cloud Platform. Create a new project, click Enable APIs and Services and find and enable the Google Photos API. Then go to the Keys section and create an OAuth Client ID. You'll need to add a consent screen, the only field you need to fill out is the product name. Choose Web Application as the application type. When prompted for the authorized redirect URL enter https://script.google.com/macros/d/{SCRIPTID}/usercallback and replace {SCRIPTID} with the Script ID you copied above. Copy the Client ID and Client Secret which will be used in the next step.

Go back to the Apps Script project and paste the code below into the Code.gs window:

Enter the Client ID and Client Secret inside the empty quotes at the top of the file. There is a BackupFolder option at the top as well - the default is 'Google Photos' which will mimic the old behavior. You can change this if you like but make sure that the desired folder exists before running the script. Save the script.

Go back to the spreadsheet you created and reload. After a few seconds you will have a Google Photos Backup menu (to the right of the Help menu). Choose 'Authorize' from this menu. You will be prompted to give the script various permissions which you should grant. After this a sidebar should appear on the spreadsheet (if not choose 'Authorize' from the Google Photos Backup menu again). Click the authorize link from the sidebar to grant access to Google Photos. Once this is done you should be in business - choose Backup Now from the Google Photos Backup menu and any new items from yesterday should be copied to the Google Photos folder in Drive (or the folder you configured above if you changed this).

Finally you should set up a trigger to automate running the script every day. Choose 'Script editor' from the Tools menu to re-open the script, and then in the script window choose 'Current project's triggers' from the Edit menu. This will open yet another window. Click 'Add Trigger' which is cunningly hidden at the bottom right of the window. Under 'Choose which function to run' select 'runBackup'. Then under 'Select event source' select 'Time-driven'. Under 'Select type of time based trigger' select 'Day timer'. Under 'Select time of day' select the time window that works best for you. Click Save. The backup should now run every day.

The way the script is written you'll get a backup of anything added the previous day each time it runs. If there are any duplicate filenames in the backup folder the script will save a new copy of the file with (1) appended in front of the filename. Let me know in the comments if you use this script or have any suggestions to improve it.

Stars over Pinnacles

Milky Way and Jupiter over the Pinnacles National Park Campground

Timelapse of the night sky over Pinnacles National Park in California. Jupiter and the Milky Way are both prominent. Shot from the campground on July 4, 2019.

(A hike to some of the caves a few years ago).

Book reviews for June 2019

Fall; Or, Dodge in Hell by Neal Stephenson

Fall; Or, Dodge in Hell by Neal Stephenson

4/5

 

Delta-v by Daniel Suarez

Delta-v by Daniel Suarez

3/5

 

ITHCWY Newsletter for June 2019

Animation of a year of Global Cloud Cover

Timelapse of Pacifica State Beach.

Cory Doctorow argues for adversarial interoperability as a tool to weaken tech monopolies. I've reached the same conclusion: Facebook shouldn't own your social graph.

Dead Ringers S19E04 (available very briefly) has a halfway decent Brexit / Douglas Adams joke. Here's a better one.

A longer hike at China Camp State Park.

Previously:

Bay View and Shoreline Trails at China Camp State Park

Bay View Trail to Shoreline Trial at China Camp State Park

View from Bay View Trail at China Camp State Park

A nice 4 mile hike at China Camp State Park - starting at the day use parking in the campsite follow Powerline Fire Trail up to a left on Bay View Trail then left on Back Ranch Fire Trail and finally left again on Shoreline Trial back to the parking lot. Gentle ascent for three miles then a fairly steep stretch down Back Ranch Fire Trail (I slipped three times, watch where you're going) and then gentle again for the final half mile.

(Previously: shorter 3 mile hike of Back Ranch Meadows and Turtleback Point loop)

Hike starts at: 38.006014, -122.496775. View in Google Earth.

Summer Solstice 2019

Summer Solstice 2019 in Catfood Earth

Summer starts now in the Northern Hemisphere, Winter if you happen to be south of the Equator. Rendered in Catfood Earth.

(Previously)

San Francisco from San Bruno Mountain

(Recent Photos)

Pacifica

Pacifica

Timelapse of Pacifica State Beach.

Book reviews for May 2019

Updated on Thursday, June 6, 2019
How to Raise Successful People: Simple Lessons for Radical Results by Esther Wojcicki

How to Raise Successful People: Simple Lessons for Radical Results by Esther Wojcicki

4/5

 

Children of Ruin (Children of Time, #2) by Adrian Tchaikovsky

Children of Ruin (Children of Time, #2) by Adrian Tchaikovsky

4/5

 

Machines Like Me by Ian McEwan

Machines Like Me by Ian McEwan

5/5

 

Then She Was Gone by Lisa Jewell

Then She Was Gone by Lisa Jewell

3/5

 

Children of Time by Adrian Tchaikovsky

Children of Time by Adrian Tchaikovsky

3/5

 

Winter World (The Long Winter #1) by A.G. Riddle

Winter World (The Long Winter #1) by A.G. Riddle

3/5