theriex / rh

PastKey.org source and issues
https://pastkey.org
1 stars 0 forks source link

Bulk point import #18

Closed theriex closed 5 years ago

theriex commented 5 years ago

It is possible (using gcloud managed import/export) to import data to/from a development server. IDs are preserved, overwriting if already used. During import IDs are locked to avoid conflicts. That could solve the problem (assuming that it works across the dev version I'm using), but it is probably not much more work to provide an actual import function. The key is whether preserving IDs is important for development, or if pulling down a bunch of points for a timeline is more generally useful. Thinking the latter.

It's important to note that importing a bunch of points into a timeline is very resource intensive and could blow quotas for the day. This is an expert mode thing and should at least be coordinated, if not batched.

Timeline data can be downloaded from the tabular display. Point pics can accessed as PNG e.g. https://pastkey.org/ptpic?pointid=NNN

What needs to get done:

theriex commented 5 years ago

Switched to reference mode on https://pastkey.org/timeline/tubman and downloaded in JSON format, saving the file to tubman.json in the build directory. After verifying a local development timeline with slug "tubman", I ran node ptimport.js test@testing.com testing tubman and it downloaded all the pics and uploaded all the points. Really great for populating some timelines for local development.