{"html_url": "https://github.com/simonw/datasette/issues/26#issuecomment-343644976", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/26", "id": 343644976, "node_id": "MDEyOklzc3VlQ29tbWVudDM0MzY0NDk3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-11T06:42:23Z", "updated_at": "2017-11-11T06:42:23Z", "author_association": "OWNER", "body": "Simplest version of this:\r\n\r\n1. Create a temporary directory\r\n2. Write a Dockerfile into it that pulls an image and pip installs datasette\r\n3. Add symlinks to the DBs they listed (so we don't have to copy them)\r\n4. Shell out to \"now\"\r\n5. Done!\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267861210, "label": "Command line tool for uploading one or more DBs to Now"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/26#issuecomment-343645249", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/26", "id": 343645249, "node_id": "MDEyOklzc3VlQ29tbWVudDM0MzY0NTI0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-11T06:48:59Z", "updated_at": "2017-11-11T06:48:59Z", "author_association": "OWNER", "body": "Doing this works:\r\n\r\n import os\r\n os.link('/tmp/databases/northwind.db', '/tmp/tmp-blah/northwind.db')\r\n\r\nThat creates a link in tmp-blah - and then when I delete that entire directory like so:\r\n\r\n import shutil\r\n shutil.rmtree('/tmp/tmp-blah')\r\n\r\nThe original database is not deleted, just the link.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267861210, "label": "Command line tool for uploading one or more DBs to Now"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/26#issuecomment-343645327", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/26", "id": 343645327, "node_id": "MDEyOklzc3VlQ29tbWVudDM0MzY0NTMyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-11T06:51:16Z", "updated_at": "2017-11-11T06:51:16Z", "author_association": "OWNER", "body": "I can create the temporary directory like so:\r\n\r\n import tempfile\r\n t = tempfile.TemporaryDirectory()\r\n t\r\n \r\n t.name\r\n '/var/folders/w9/0xm39tk94ng9h52g06z4b54c0000gp/T/tmpkym70wlp'\r\n\r\nAnd then to delete it all:\r\n\r\n t.cleanup()\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267861210, "label": "Command line tool for uploading one or more DBs to Now"}, "performed_via_github_app": null}