{"id":359,"date":"2019-12-25T04:55:32","date_gmt":"2019-12-24T19:55:32","guid":{"rendered":"https:\/\/blog.hgrs.me\/?p=359"},"modified":"2021-01-19T06:50:52","modified_gmt":"2021-01-18T21:50:52","slug":"python%e3%81%8b%e3%82%89mac%e3%80%81slack%e3%80%81didcord%e3%80%81line%e3%81%ab%e9%80%9a%e7%9f%a5%e3%82%92%e9%a3%9b%e3%81%b0%e3%81%99%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/blog.hgrs.me\/archives\/359.html","title":{"rendered":"Python\u304b\u3089Mac\u3001Slack\u3001Discord\u3001LINE\u306b\u901a\u77e5\u3092\u98db\u3070\u3059\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u3063\u305f"},"content":{"rendered":"

\u306f\u3058\u3081\u306b<\/h2>\n

\u5b9f\u884c\u6642\u9593\u304c\u3061\u3087\u3063\u3068\u9577\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8d70\u3089\u305b\u308b\u6642\u3068\u304b\u306b\u3001\u7d42\u308f\u3063\u305f\u3053\u3068\u3092\u901a\u77e5\u3057\u3066\u6b32\u3057\u304b\u3063\u305f\u306e\u3067\u3001\u4f5c\u3063\u305f\u3002<\/p>\n

\u30e9\u30a4\u30d6\u30e9\u30ea<\/h2>\n

\u3053\u3053<\/a> \u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n

\u4f7f\u3044\u65b9\u3068\u304b\u306f README \u898b\u308c\u3070\u3001\u57fa\u672c\u5168\u90e8\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u3001\u8a00\u3063\u3066\u3057\u307e\u3048\u3070\u3053\u306e\u8a18\u4e8b\u306f\u7279\u306b\u8aad\u3080\u5fc5\u8981\u3082\u306a\u3044\u3067\u3059\u3002<\/p>\n

\u4ee5\u4e0b\u4f59\u8ac7\u3002<\/p>\n

\u306a\u305c\u3064\u304f\u3063\u305f\u306e\u304b<\/h2>\n

\u50d5\u306e\u74b0\u5883\u3060\u3068\u4ed5\u4e8b\u3060\u3063\u305f\u308a\u3001\u7814\u7a76\u3067\u4f7f\u3063\u3066\u308b\u30b3\u30fc\u30c9\u306e\u591a\u304f\u304c\u5b9f\u884c\u306b\u7d50\u69cb\u306a\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u6570\u5341\u5206\u304b\u3089\u6570\u65e5\u3068\u304b\u3067\u3059\u3002<\/p>\n

\u305d\u308c\u3060\u3068\u3001\u3044\u3061\u3044\u3061\u5b9f\u884c\u7d4c\u904e\u3092\u8ffd\u3046\u306e\u3082\u7121\u99c4\u3060\u3051\u3069\u3001\u6c17\u4ed8\u3044\u305f\u3089\u7d42\u308f\u3063\u3066\u304b\u306a\u308a\u6642\u9593\u304c\u305f\u3063\u3066\u3044\u305f\u3068\u304b\u3082\u3082\u3063\u305f\u3044\u306a\u3044\u3067\u3059\u3002<\/p>\n

\u305d\u3053\u3067\u3001\u5b9f\u884c\u7d4c\u904e\u3060\u3063\u305f\u308a\u7d42\u4e86\u3092\u77e5\u3089\u305b\u3066\u304f\u308c\u305f\u3089\u3044\u3044\u306a\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4f5c\u308a\u307e\u3057\u305f\u3002<\/p>\n

\u6614\u306b\u3082\u30b3\u30fc\u30c9\u4e2d\u306b\u6bce\u56de\u66f8\u304d\u6368\u3066\u3067\u901a\u77e5\u3092\u9001\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u305f\u308a\u3057\u305f\u3093\u3067\u3059\u304c\u3001\u66f8\u304d\u6368\u3066\u3082\u3088\u304f\u306a\u3044\u3057\u3001\u5229\u4fbf\u6027\u3092\u9ad8\u3081\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u3061\u3083\u3093\u3068\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n

\u4f7f\u7528\u3057\u3066\u3044\u308b\u6280\u8853<\/h2>\n

macOS \u7cfb<\/h3>\n

\u30d3\u30fc\u30d7\u3068\u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u306e\u901a\u77e5\u3092\u51fa\u3059\u306e\u306b\u306f AppleScript \u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b osascript<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092 Python \u304b\u3089 subprocess<\/code> \u3067\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n

AppleScript \u306f\u7d50\u69cb\u3044\u308d\u3044\u308d\u306a\u3053\u3068\u304c\u3067\u304d\u3066\u3001\u4eca\u56de\u5b9f\u884c\u3057\u3066\u3044\u308b\u901a\u77e5\u30bb\u30f3\u30bf\u30fc\u3078\u306e\u901a\u77e5\u306e\u9001\u4fe1\u306f\u7d50\u69cb\u8c4a\u5bcc\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

\u308f\u304b\u308a\u3084\u3059\u3044\u3068\u3053\u308d\u3060\u3068\u30bf\u30a4\u30c8\u30eb\u3068\u30b5\u30d6\u30bf\u30a4\u30c8\u30eb\u3067\u3059\u306d\u3002\u5b9f\u969b\u306b\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n

\"\u901a\u77e5\u30bb\u30f3\u30bf\u30fc\"<\/p>\n

Slack\u3001Discord\u3001LINE<\/h3>\n

Slack \u3068 Discord \u3067\u306f\u305d\u308c\u305e\u308c API \u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3092\u5229\u7528\u3057\u305f\u901a\u77e5\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u3061\u3089\u306f Python \u306e requests<\/code> \u3092\u5229\u7528\u3057\u3066\u6295\u3052\u3066\u3044\u307e\u3059\u3002LINE \u306b\u3064\u3044\u3066\u3082 LINE Notify \u3092\u5229\u7528\u3057\u3066\u6d41\u308c\u306f\u30a6\u30a7\u30d6\u30d5\u30c3\u30af\u3068\u4f3c\u305f\u611f\u3058\u3067\u3059\u306d\u3002<\/p>\n

\u305d\u306e\u4ed6<\/h2>\n

\u30e9\u30a4\u30bb\u30f3\u30b9<\/h3>\n

MIT License \u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u81ea\u7531\u306b\u4f7f\u3063\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u3067\u3002<\/p>\n

\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u30fb\u30c9\u30c3\u30af\u30b9\u30c8\u30ea\u30f3\u30b0\u3082\u3069\u304d<\/h3>\n

\u65e5\u672c\u8a9e\u3067\u5c11\u3057\u66f8\u3044\u3066\u3044\u307e\u3059\u3002\u6700\u8fd1\u30b3\u30e1\u30f3\u30c8\u3092\u65e5\u672c\u8a9e\u306b\u3059\u308b\u3050\u3089\u3044\u306a\u3089\u30b3\u30fc\u30c9\u81ea\u4f53\u65e5\u672c\u8a9e\u3067\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3063\u3066\u6c17\u304c\u3057\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u6642\u9593\u304c\u3042\u3063\u305f\u3089\u8a66\u3057\u3066\u307f\u305f\u3044\u3002<\/p>\n

\u30a2\u30a4\u30b3\u30f3\uff1f<\/h3>\n

\u3053\u306e\u8a18\u4e8b\u306e\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u306b\u3082\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u300cpy!\u300d\u3063\u3066\u66f8\u3044\u3066\u3042\u308b\u3084\u3064\u3067\u3059\u306d\u3002\u300cpy\u300d\u304c\u5c0f\u6587\u5b57\u306a\u306e\u306b\u300c!\u300d\u3068\u4f4d\u7f6e\u3092\u63c3\u3048\u305f\u308a\u3001\u306a\u3093\u304b\u305d\u308c\u3063\u307d\u3044\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u307f\u305f\u308a\u3001\u904a\u3093\u3067\u3044\u307e\u3059\u3002\u6587\u5b57\u3060\u3051\u3067\u3059\u3051\u3069\u3002\u30d5\u30a9\u30f3\u30c8\u306f Futura \u3067\u3059\u3002<\/p>\n

\u30af\u30e9\u30b9\u56f3<\/h3>\n

Pylint \u306e Pyreverse \u3092\u4f7f\u7528\u3057\u3066\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u30d5\u30a9\u30f3\u30c8\u304c\u6c17\u306b\u98df\u308f\u306a\u304b\u3063\u305f\u306e\u3067\u3001SVG \u3067\u51fa\u529b\u3057\u3066\u30d5\u30a9\u30f3\u30c8\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n

\"\u30af\u30e9\u30b9\u56f3\"<\/p>\n

\u4eca\u5f8c\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/h3>\n

Slack \u3068 Discord \u306f\u8a73\u7d30\u8a2d\u5b9a\u3092\u8db3\u305b\u305d\u3046\u306a\u306e\u3067\u3084\u308c\u305f\u3089\u3084\u308d\u3046\u304b\u306a\u3068\u3002\u3042\u3068\u30d5\u30a1\u30a4\u30eb\u3068\u304b\u9001\u308c\u305f\u3089\u4fbf\u5229\u305d\u3046\u3067\u3059\u3088\u306d\u3002<\/p>\n

\u304a\u308f\u308a\u306b<\/h2>\n

\u3088\u304b\u3063\u305f\u3089\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u306f\u3058\u3081\u306b \u5b9f\u884c\u6642\u9593\u304c\u3061\u3087\u3063\u3068\u9577\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8d70\u3089\u305b\u308b\u6642\u3068\u304b\u306b\u3001\u7d42\u308f\u3063\u305f\u3053\u3068\u3092\u901a\u77e5\u3057\u3066\u6b32\u3057\u304b\u3063\u305f\u306e\u3067\u3001…<\/p>\n","protected":false},"author":1,"featured_media":361,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[32,14],"_links":{"self":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/359"}],"collection":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":0,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media\/361"}],"wp:attachment":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}