{"action":"created","issue":{"url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/3","repository_url":"https://api.github.com/repos/alice1017/alice1017.github.io","labels_url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/3/comments","events_url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/3/events","html_url":"https://github.com/alice1017/alice1017.github.io/issues/3","id":358348845,"node_id":"MDU6SXNzdWUzNTgzNDg4NDU=","number":3,"title":"Create a shell script for generate new article with template","user":{"login":"alice1017","id":465679,"node_id":"MDQ6VXNlcjQ2NTY3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465679?v=4","gravatar_id":"","url":"https://api.github.com/users/alice1017","html_url":"https://github.com/alice1017","followers_url":"https://api.github.com/users/alice1017/followers","following_url":"https://api.github.com/users/alice1017/following{/other_user}","gists_url":"https://api.github.com/users/alice1017/gists{/gist_id}","starred_url":"https://api.github.com/users/alice1017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alice1017/subscriptions","organizations_url":"https://api.github.com/users/alice1017/orgs","repos_url":"https://api.github.com/users/alice1017/repos","events_url":"https://api.github.com/users/alice1017/events{/privacy}","received_events_url":"https://api.github.com/users/alice1017/received_events","type":"User","site_admin":false},"labels":[{"id":1034807271,"node_id":"MDU6TGFiZWwxMDM0ODA3Mjcx","url":"https://api.github.com/repos/alice1017/alice1017.github.io/labels/feature","name":"feature","color":"EAA8BF","default":false},{"id":1034805142,"node_id":"MDU6TGFiZWwxMDM0ODA1MTQy","url":"https://api.github.com/repos/alice1017/alice1017.github.io/labels/idea","name":"idea","color":"97D3E3","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-09T04:29:05Z","updated_at":"2018-09-10T00:13:52Z","closed_at":null,"author_association":"OWNER","body":"最初から全部書くのはめんどくさいので、記事の日付（`yyyy`-`mm`-`dd`）を現在時刻から取得し、\r\nまた記事トップのメタデータもテンプレートで生成してくれるスクリプトが欲しい"},"comment":{"url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/comments/419755649","html_url":"https://github.com/alice1017/alice1017.github.io/issues/3#issuecomment-419755649","issue_url":"https://api.github.com/repos/alice1017/alice1017.github.io/issues/3","id":419755649,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTc1NTY0OQ==","user":{"login":"alice1017","id":465679,"node_id":"MDQ6VXNlcjQ2NTY3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465679?v=4","gravatar_id":"","url":"https://api.github.com/users/alice1017","html_url":"https://github.com/alice1017","followers_url":"https://api.github.com/users/alice1017/followers","following_url":"https://api.github.com/users/alice1017/following{/other_user}","gists_url":"https://api.github.com/users/alice1017/gists{/gist_id}","starred_url":"https://api.github.com/users/alice1017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alice1017/subscriptions","organizations_url":"https://api.github.com/users/alice1017/orgs","repos_url":"https://api.github.com/users/alice1017/repos","events_url":"https://api.github.com/users/alice1017/events{/privacy}","received_events_url":"https://api.github.com/users/alice1017/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T00:13:52Z","updated_at":"2018-09-10T00:13:52Z","author_association":"OWNER","body":"# Pythonで書くかBashで書くか\r\n\r\nPythonの方が楽な気がする\r\n\r\n```python\r\nimport sys\r\nfrom datetime import datetime\r\n\r\ndef generate_filename(uri):\r\n\r\n  date = datetime.now().date()\r\n  year = date.year\r\n  month = date.month\r\n  day = date.day\r\n\r\n  filename_format = \"{0}-{1}-{2}-{3}.md\"\r\n\r\n  return filename_format.format(year, month, day, uri.replace(\" \",\"-\"))\r\n\r\nif __name__ == \"__main__\":\r\n  generate_filename(sys.argv[1])\r\n```"}}
{"actor":{"display_login":"alice1017"}}