home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

23 rows where "created_at" is on date 2020-05-03 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, created_at (date), updated_at (date)

issue 6

  • sqlite-utils create-table command 7
  • Import photo metadata from Apple Photos into SQLite 7
  • [Feature Request] Support Repo Name in Search 🥺 3
  • Set up a pattern portfolio 2
  • sqlite-utils create-view CLI command 2
  • Documentation unit tests for CLI commands 2

author_association 3

  • OWNER 13
  • MEMBER 8
  • NONE 2

user 2

  • simonw 21
  • zzeleznick 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
623199750 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623199750 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5OTc1MA== simonw 9599 2020-05-03T23:17:58Z 2020-05-03T23:17:58Z MEMBER

Reading this source code is really useful for figuring out how to store a photo in a DB table: https://github.com/RhetTbull/osxphotos/blob/7444b6d173918a3ad2a07aefce5ecf054786c787/osxphotos/photoinfo.py

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623199701 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623199701 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5OTcwMQ== simonw 9599 2020-05-03T23:17:38Z 2020-05-03T23:17:38Z MEMBER

Record burst_uuid as a column: (Pdb) with_bursts[0]._info["burstUUID"] '703FAA23-57BF-40B4-8A33-D9CEB143391B'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623199214 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623199214 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5OTIxNA== simonw 9599 2020-05-03T23:14:08Z 2020-05-03T23:14:08Z MEMBER

Albums have UUIDs: (Pdb) photo.album_info[0].__dict__ {'_uuid': '17816791-ABF3-447B-942C-9FA8065EEBBA', '_db': osxphotos.PhotosDB(dbfile='/Users/simon/Pictures/Photos Library.photoslibrary/database/photos.db'), '_title': 'Geotaggable Photos geotagged'}

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623198986 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623198986 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5ODk4Ng== simonw 9599 2020-05-03T23:12:31Z 2020-05-03T23:12:46Z MEMBER

To get the taken date in UTC: ``` from datetime import timezone (Pdb) photo.date.astimezone(timezone.utc).isoformat() '2018-02-13T20:21:31.620000+00:00' (Pdb) photo.date.astimezone(timezone.utc).isoformat().split(".") ['2018-02-13T20:21:31', '620000+00:00'] (Pdb) photo.date.astimezone(timezone.utc).isoformat().split(".")[0] '2018-02-13T20:21:31' (Pdb) photo.date.astimezone(timezone.utc).isoformat().split(".")[0] + "+00:00" '2018-02-13T20:21:31+00:00'

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623198653 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623198653 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5ODY1Mw== simonw 9599 2020-05-03T23:09:57Z 2020-05-03T23:09:57Z MEMBER

For locations: I'll add place_x columns for all of these: (Pdb) photo.place.address._asdict() {'street': None, 'sub_locality': None, 'city': 'Loreto', 'sub_administrative_area': 'Loreto', 'state_province': 'BCS', 'postal_code': None, 'country': 'Mexico', 'iso_country_code': 'MX'}

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623195197 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623195197 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5NTE5Nw== simonw 9599 2020-05-03T22:44:33Z 2020-05-03T22:44:33Z MEMBER

Command will be this:

$ photos-to-sqlite apple-photos photos.db

This will populate a apple_photos table with the data imported by the osxphotos library, plus the calculated sha256.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623193947 https://github.com/dogsheep/dogsheep-photos/issues/1#issuecomment-623193947 https://api.github.com/repos/dogsheep/dogsheep-photos/issues/1 MDEyOklzc3VlQ29tbWVudDYyMzE5Mzk0Nw== simonw 9599 2020-05-03T22:36:17Z 2020-05-03T22:36:17Z MEMBER

I'm going to use osxphotos for this.

Since I've already got code to upload photos and insert them into a table based on their sha256 hash, my first go at this will be to import data using the tool and foreign-key it to the sha256 hash in the existing table.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Import photo metadata from Apple Photos into SQLite 602533300  
623128528 https://github.com/simonw/sqlite-utils/issues/107#issuecomment-623128528 https://api.github.com/repos/simonw/sqlite-utils/issues/107 MDEyOklzc3VlQ29tbWVudDYyMzEyODUyOA== simonw 9599 2020-05-03T15:36:58Z 2020-05-03T15:36:58Z OWNER

Documentation: https://github.com/simonw/sqlite-utils/blob/d16097231c5e51ea857b58c700f97a17b68dc583/docs/cli.rst#creating-views

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-view CLI command 611222968  
623127140 https://github.com/simonw/sqlite-utils/issues/107#issuecomment-623127140 https://api.github.com/repos/simonw/sqlite-utils/issues/107 MDEyOklzc3VlQ29tbWVudDYyMzEyNzE0MA== simonw 9599 2020-05-03T15:27:22Z 2020-05-03T15:27:22Z OWNER

Syntax:

$ sqlite-utils create-view my.db myview "select sqlite_version()"

Also accepts --replace and --ignore options, same as create-table.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-view CLI command 611222968  
623126943 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623126943 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzEyNjk0Mw== simonw 9599 2020-05-03T15:25:55Z 2020-05-03T15:25:55Z OWNER

Documentation: https://github.com/simonw/sqlite-utils/blob/78264b738cd72ffad6e5c32ede3f074f8aad0ca4/docs/cli.rst#creating-tables

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623120166 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623120166 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzEyMDE2Ng== simonw 9599 2020-05-03T14:38:59Z 2020-05-03T14:38:59Z OWNER

I'll stick with requiring all three fk arguments.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623051550 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623051550 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzA1MTU1MA== simonw 9599 2020-05-03T04:17:18Z 2020-05-03T04:17:18Z OWNER

Be nice if you could do --fk colname and have it guess the rest, but I'm not sure how to do that with a CLI option - they need a fixed number of arguments so that they don't consume the next batch of options.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623051447 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623051447 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzA1MTQ0Nw== simonw 9599 2020-05-03T04:15:52Z 2020-05-03T04:15:52Z OWNER

Supporting --fk colname othertable othercol would be neat too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623051392 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623051392 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzA1MTM5Mg== simonw 9599 2020-05-03T04:15:05Z 2020-05-03T04:15:05Z OWNER

I need tests for what happens if table already exists, or if the user provides invalid column types.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623050458 https://github.com/simonw/sqlite-utils/issues/108#issuecomment-623050458 https://api.github.com/repos/simonw/sqlite-utils/issues/108 MDEyOklzc3VlQ29tbWVudDYyMzA1MDQ1OA== simonw 9599 2020-05-03T04:00:32Z 2020-05-03T04:00:32Z OWNER

from sqlite_utils import cli cli.cli.commands.keys() Outputs: dict_keys(['tables', 'views', 'vacuum', 'optimize', 'add-column', 'add-foreign-key', 'index-foreign-keys', 'create-index', 'enable-fts', 'populate-fts', 'disable-fts', 'insert', 'upsert', 'create-table', 'query', 'rows'])

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation unit tests for CLI commands 611326701  
623050375 https://github.com/simonw/sqlite-utils/issues/108#issuecomment-623050375 https://api.github.com/repos/simonw/sqlite-utils/issues/108 MDEyOklzc3VlQ29tbWVudDYyMzA1MDM3NQ== simonw 9599 2020-05-03T03:59:16Z 2020-05-03T03:59:27Z OWNER

import re r = re.compile(r'\$ sqlite-utils (\S+) ') rst = open("docs/cli.rst").read() {command for command in r.findall(rst) if "." not in command and ":" not in command} Outputs: {'add-column', 'add-foreign-key', 'create-index', 'disable-fts', 'enable-fts', 'index-foreign-keys', 'insert', 'optimize', 'populate-fts', 'query', 'rows', 'tables', 'vacuum', 'views'}

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation unit tests for CLI commands 611326701  
623049505 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623049505 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzA0OTUwNQ== simonw 9599 2020-05-03T03:45:32Z 2020-05-03T03:45:32Z OWNER

Could take --ignore to ignore if table already exists, and --replace to drop and replace it if it exists.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623048530 https://github.com/simonw/sqlite-utils/issues/27#issuecomment-623048530 https://api.github.com/repos/simonw/sqlite-utils/issues/27 MDEyOklzc3VlQ29tbWVudDYyMzA0ODUzMA== simonw 9599 2020-05-03T03:30:31Z 2020-05-03T03:30:31Z OWNER

Copy the design for --not-null and --default from the insert command: $ sqlite-utils insert dogs.db dogs_with_scores dogs-with-scores.json \ --not-null=age \ --not-null=name \ --default age 2 \ --default score 5

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils create-table command 455496504  
623047233 https://github.com/simonw/datasette/issues/151#issuecomment-623047233 https://api.github.com/repos/simonw/datasette/issues/151 MDEyOklzc3VlQ29tbWVudDYyMzA0NzIzMw== simonw 9599 2020-05-03T03:11:16Z 2020-05-03T03:11:16Z OWNER

Now live at https://latest.datasette.io/-/patterns

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Set up a pattern portfolio 276718605  
623044858 https://github.com/simonw/datasette/issues/151#issuecomment-623044858 https://api.github.com/repos/simonw/datasette/issues/151 MDEyOklzc3VlQ29tbWVudDYyMzA0NDg1OA== simonw 9599 2020-05-03T02:37:03Z 2020-05-03T02:37:03Z OWNER

I'm going to put this at /-/patterns, which will render a template called patterns.html.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Set up a pattern portfolio 276718605  
623044643 https://github.com/dogsheep/github-to-sqlite/issues/38#issuecomment-623044643 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/38 MDEyOklzc3VlQ29tbWVudDYyMzA0NDY0Mw== zzeleznick 5779832 2020-05-03T02:34:32Z 2020-05-03T02:34:32Z NONE
  1. More than glad to share feedback from the sidelines as a starrer.

-- Motivation: -- Datasette is a data hammer and I'm looking for nails -- e.g. Find which repos a user has starred => trigger a TBD downstream action select starred_at, starred_by, full_name as repo_name from repos_starred where starred_by = "zzeleznick" order by starred_at desc

| starred_at | starred_by | repo_name | | --- | --- | --- | | 2020-02-11T01:08:59Z | zzeleznick | dogsheep/twitter-to-sqlite | | 2020-01-11T21:57:34Z | zzeleznick | simonw/datasette |

  1. In my day job, I use airflow, and that's the mental model I'm bringing to datasette.

  2. I see your project like twitter-to-sqlite akin to Operators in Airflow world.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[Feature Request] Support Repo Name in Search 🥺 611284481  
623038378 https://github.com/dogsheep/github-to-sqlite/issues/38#issuecomment-623038378 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/38 MDEyOklzc3VlQ29tbWVudDYyMzAzODM3OA== simonw 9599 2020-05-03T01:21:13Z 2020-05-03T01:21:13Z MEMBER

No this is really useful feedback! I'm so close to this project that I miss what's not obvious to people dropping in for the first time.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[Feature Request] Support Repo Name in Search 🥺 611284481  
623038148 https://github.com/dogsheep/github-to-sqlite/issues/38#issuecomment-623038148 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/38 MDEyOklzc3VlQ29tbWVudDYyMzAzODE0OA== zzeleznick 5779832 2020-05-03T01:18:57Z 2020-05-03T01:18:57Z NONE

Thanks, @simonw!

I feel a little foolish in hindsight, but I'm on the same page now and am glad to have discovered first-hand a motivation for this repos_starred use case.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[Feature Request] Support Repo Name in Search 🥺 611284481  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 513.057ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows