Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow import from Google Takeout JSON #338

Merged
merged 12 commits into from
May 12, 2020
Merged

Conversation

simonspa
Copy link
Contributor

This PR allows to import favorites from a JSON file generated by Google Maps Takeout (Saved Places) and is a first step towards solving #66.

I'd be happy to receive some feedback and advice, especially on how to treat error conditions.

@jancborchardt
Copy link
Member

@smihael @HollowedEmpire @ph00lt0 @walley @Thovi98 since you were active on "Import Google Takeout Saved places #66", could you review this pull request and test if it works? Thanks a lot! :)

@Thovi98
Copy link

Thovi98 commented May 2, 2020

@smihael @HollowedEmpire @ph00lt0 @walley @Thovi98 since you were active on "Import Google Takeout Saved places #66", could you review this pull request and test if it works? Thanks a lot! :)

Thank you for your great work ! I’d be glad to help you, but I don’t know how to proceed to do this (I’m on Nextcloud on Yunohost, so path files are different).
And in my way to put Google out of my life, I’ve deleted all my maps saved places and history, so I could not help you for this point anymore :(

But thank you a lot for everything you do day by day to improve this - already incredible - app !
I will try to help you to test other PR when I have a better comprehension of this.

@ph00lt0
Copy link

ph00lt0 commented May 2, 2020

I have installed the changes, but I am not able to select the json.

@simonspa
Copy link
Contributor Author

simonspa commented May 2, 2020

Have you recompiled the JavaScript?

@ph00lt0
Copy link

ph00lt0 commented May 2, 2020

Yeah I did execute the make command, however that did not help. I fully deleted the app and reinstalled it and then it worked.
Update: i just saw that the counter is on 255 locations. However I imported 253 locations in total.

Copy link

@ph00lt0 ph00lt0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve it, since I think that the issue i had might be due to my setup. The locations seem to be imported correctly. Although I am still wondering what did add 2 more locations.

@simonspa
Copy link
Contributor Author

simonspa commented May 3, 2020

Hm, that's odd looking at the code I have no idea where counting could go wrong. Are you sure you only had 253 locations in your JSON? Would you mind sharing it (privately) with me?

@ph00lt0
Copy link

ph00lt0 commented May 3, 2020

I also couldnt not find any evidence that this would be cause by your contribution. I am not willing share the file as this includes to much information.

@simonspa
Copy link
Contributor Author

simonspa commented May 3, 2020

Sure, that's what I presumed - it's why we want to move it away from Google in the first place, no? :)

@ph00lt0
Copy link

ph00lt0 commented May 3, 2020

Yep, well I did leave google behind some time ago. I still hoped for a import function in Nextcloud of my data export. So thanks a lot for your effort.

@jancborchardt
Copy link
Member

@simonspa I hope to test this soon (although I have no Google Takeout content so I can only test the interface), any screenshots would help a lot to review the design quicker. :)

@simonspa
Copy link
Contributor Author

simonspa commented May 3, 2020

Hi @jancborchardt

here you go:

image

image

image

A JSON file with reference data as returned by Google Takeout can be found in the linked issue.

@ph00lt0
Copy link

ph00lt0 commented May 3, 2020

The json data looks like this @jancborchardt

{ "type" : "FeatureCollection", "features" : [ { "geometry" : { "coordinates" : [ 4.895168, 52.370216 ], "type" : "Point" }, "properties" : { "Google Maps URL" : "http://maps.google.com/?q=Amsterdam,+Nederland&ftid=0x47c63fb5949a7755:0x6600fd4cb7c0af8d", "Location" : { "Latitude" : "52.370216", "Longitude" : "4.895168" }, "Published" : "2018-02-01T12:00:51Z", "Title" : "Amsterdam, Nederland", "Updated" : "2018-02-01T12:00:51Z" }, "type" : "Feature" } ] }

@jancborchardt
Copy link
Member

Ah perfect! Only 1 thing: Could you adjust the title to clarify GeoJSON like: GeoJSON (Google Maps), then it’s clear we can also import from Google Maps. :)

@simonspa
Copy link
Contributor Author

simonspa commented May 3, 2020

Updated:

image

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 design-wise! :)

Yes the title of the modal looks very crowded now, but at least gives all info and I’m not sure how to do this better at the moment.

@jancborchardt
Copy link
Member

Btw @simonspa @ph00lt0 we have a Maps team channel on our Nextcloud Talk instance – I can add you there with guest accounts if you like? It makes communication much easier. :)

@ph00lt0
Copy link

ph00lt0 commented May 6, 2020

@jancborchardt sure fine with me.

@simonspa
Copy link
Contributor Author

simonspa commented May 7, 2020

@jancborchardt yes, please do so!

@tacruc tacruc merged commit f19e15b into nextcloud:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Google Takeout Saved places
5 participants