{"action":"created","issue":{"url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/54","repository_url":"https://api.github.com/repos/jsbroks/coco-annotator","labels_url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/54/comments","events_url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/54/events","html_url":"https://github.com/jsbroks/coco-annotator/pull/54","id":393307523,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMzY3ODE5","number":54,"title":"Create categories and datasets from json files on startup","user":{"login":"matt-deboer","id":1491381,"node_id":"MDQ6VXNlcjE0OTEzODE=","avatar_url":"https://avatars0.githubusercontent.com/u/1491381?v=4","gravatar_id":"","url":"https://api.github.com/users/matt-deboer","html_url":"https://github.com/matt-deboer","followers_url":"https://api.github.com/users/matt-deboer/followers","following_url":"https://api.github.com/users/matt-deboer/following{/other_user}","gists_url":"https://api.github.com/users/matt-deboer/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-deboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-deboer/subscriptions","organizations_url":"https://api.github.com/users/matt-deboer/orgs","repos_url":"https://api.github.com/users/matt-deboer/repos","events_url":"https://api.github.com/users/matt-deboer/events{/privacy}","received_events_url":"https://api.github.com/users/matt-deboer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T04:14:47Z","updated_at":"2018-12-21T17:11:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/jsbroks/coco-annotator/pulls/54","html_url":"https://github.com/jsbroks/coco-annotator/pull/54","diff_url":"https://github.com/jsbroks/coco-annotator/pull/54.diff","patch_url":"https://github.com/jsbroks/coco-annotator/pull/54.patch"},"body":"This is an implementation of #50, allowing to automatically create categories and datasets on startup.\r\n\r\nTo create categories and datasets, set the environment variable `INITIALIZE_FROM_FILE` to the path of a json file which defines a set of categories and/or datasets to be created/updated on startup. \r\n\r\nFor example:\r\n```\r\n{ \r\n  \"categories\": [\r\n    { \"name\": \"cat\", \"supercategory\": \"animal\", \"color\": \"#990000\" },\r\n    { \"name\":\"dog\", \"supercategory\": \"animal\", \"color\": \"#5566AA\"}\r\n  ],\r\n  \"datasets\": [\r\n    {\"name\": \"dataset1\", \"categories\": [\"dog\", \"cat\"]}\r\n  ]\r\n}\r\n```\r\nNote: only the `name` attribute is required for a category or dataset.\r\nNote: the net result is that the objects defined in this file are added and/or updated to the existing objects--but objects not listed in this file are ignored (i.e., not deleted).\r\n"},"comment":{"url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/comments/449444779","html_url":"https://github.com/jsbroks/coco-annotator/pull/54#issuecomment-449444779","issue_url":"https://api.github.com/repos/jsbroks/coco-annotator/issues/54","id":449444779,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTQ0NDc3OQ==","user":{"login":"matt-deboer","id":1491381,"node_id":"MDQ6VXNlcjE0OTEzODE=","avatar_url":"https://avatars0.githubusercontent.com/u/1491381?v=4","gravatar_id":"","url":"https://api.github.com/users/matt-deboer","html_url":"https://github.com/matt-deboer","followers_url":"https://api.github.com/users/matt-deboer/followers","following_url":"https://api.github.com/users/matt-deboer/following{/other_user}","gists_url":"https://api.github.com/users/matt-deboer/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-deboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-deboer/subscriptions","organizations_url":"https://api.github.com/users/matt-deboer/orgs","repos_url":"https://api.github.com/users/matt-deboer/repos","events_url":"https://api.github.com/users/matt-deboer/events{/privacy}","received_events_url":"https://api.github.com/users/matt-deboer/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T17:11:47Z","updated_at":"2018-12-21T17:11:47Z","author_association":"CONTRIBUTOR","body":"Ok @jsbroks, PTAL.\r\nI've updated to a single file, and applied the other recommendations. "}}
{"actor":{"display_login":"matt-deboer"}}