{"id":1178,"date":"2023-03-24T20:34:11","date_gmt":"2023-03-24T11:34:11","guid":{"rendered":"https:\/\/fukugyouhistory.tokyo\/?p=1178"},"modified":"2023-03-24T20:54:13","modified_gmt":"2023-03-24T11:54:13","slug":"python%e3%80%80qr%e3%82%b3%e3%83%bc%e3%83%89%e3%81%ae%e4%bd%9c%e6%88%90%e3%80%80%e5%ad%a6%e7%bf%92%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/fukugyouhistory.tokyo\/?p=1178","title":{"rendered":"Python\u3000QR\u30b3\u30fc\u30c9\u306e\u4f5c\u6210\u3000\u5b66\u7fd2\u3057\u3066\u307f\u305f"},"content":{"rendered":"\n<p>\u3053\u3053\u307e\u3067\u3001<a rel=\"noreferrer noopener\" href=\"https:\/\/fukugyouhistory.tokyo\/?p=1041\" target=\"_blank\">Python\u306e\u74b0\u5883\u69cb\u7bc9<\/a>\u3001<a href=\"https:\/\/fukugyouhistory.tokyo\/?p=1094\">Python\u306e\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u30fb\u30b0\u30e9\u30d5\u63cf\u753b<\/a>\u3001<a href=\"https:\/\/fukugyouhistory.tokyo\/?p=1155\">Python\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u8868\u793a\u30fb\u6642\u523b\u8a08\u7b97<\/a>\u3092\u5b66\u7fd2\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u3001QR\u30b3\u30fc\u30c9\u306e\u4f5c\u6210\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">QR\u30b3\u30fc\u30c9\u3068\u306f<\/h2>\n\n\n\n<p>\u65e5\u672c\u30fb\u611b\u77e5\u770c\u306e\u81ea\u52d5\u8eca\u90e8\u54c1\u30e1\u30fc\u30ab\u30fc\u3067\u3042\u308b\u30c7\u30f3\u30bd\u30fc\u306e\u958b\u767a\u90e8\u9580\uff08\u73fe\u5728\u306f\u5206\u793e\u5316\u3057\u3066\u30c7\u30f3\u30bd\u30fc\u30a6\u30a7\u30fc\u30d6\uff09\u304c\u767a\u660e\u3057\u305f\u30de\u30c8\u30ea\u30c3\u30af\u30b9\u578b\u4e8c\u6b21\u5143\u30b3\u30fc\u30c9\u306e\u3053\u3068\u3002<\/p>\n\n\n\n<p>QR\u30b3\u30fc\u30c9\u306e\u5bb9\u91cf\u306f\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>\u6570\u5b57\u306e\u307f<strong><\/strong><\/th><td>\u6700\u59277,089\u6587\u5b57<\/td><\/tr><tr><th>\u82f1\u6570 (US-ASCII)<\/th><td>\u6700\u59274,296\u6587\u5b57<\/td><\/tr><tr><th>\u30d0\u30a4\u30ca\u30ea\uff088\u30d3\u30c3\u30c8\uff09<\/th><td>\u6700\u59272,953\u30d0\u30a4\u30c8<\/td><\/tr><tr><th>\u6f22\u5b57\u30fb\u304b\u306a (Shift_JIS)<\/th><td>\u6700\u59271,817\u6587\u5b57<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">\u6700\u5927\u5bb9\u91cf\u306f\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6700\u5927 (40)\u3001\u8aa4\u308a\u8a02\u6b63\u30ec\u30d9\u30eb\u3092\u6700\u4f4e (L) \u306b\u3057\u305f\u5834\u5408\u306e\u5024\u3002<\/figcaption><\/figure>\n\n\n\n<p>URL\u7b49\u3067\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u4ee5\u5916\u306b\u3082\u7d50\u69cb\u9577\u3081\u306e\u6587\u7ae0\u307e\u3067\u53d6\u308a\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">QR\u30b3\u30fc\u30c9\u306e\u4f5c\u6210<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u3067\u306f\u30b3\u30fc\u30c9\u5185\u3067\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>!pip install qrcode<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>import qrcode\n\n# QR\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308bURL\u306e\u4e00\u89a7\nurls = &#91;\n     \"https:\/\/fukugyouhistory.tokyo\/\",\n     \"https:\/\/fukugyouhistory.tokyo\/?page_id=535\",\n     \"https:\/\/fukugyouhistory.tokyo\/?page_id=12\",\n     \"https:\/\/fukugyouhistory.tokyo\/?page_id=419\"\n]\n\nfrom IPython.display import Image,display_png\n\n# \u4e00\u6c17\u306bQR\u30b3\u30fc\u30c9\u3092\u751f\u6210\nfor url in urls:\n    img = qrcode.make(url, box_size=3)\n    display_png(img)\n    print(url)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" sizes=\"(max-width: 524px) 100vw, 524px\" src=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-292.png\" alt=\"\" class=\"wp-image-1192\" width=\"403\" height=\"405\" srcset=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-292.png 524w, https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-292-300x300.png 300w, https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-292-150x150.png 150w\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>URL\u306e\u4e00\u89a7\u304c\u8a18\u8f09\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u51e6\u7406\u3059\u308b\u65b9\u304c\u3001\u30b9\u30de\u30fc\u30c8\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u300curls.txt\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>https:\/\/fukugyouhistory.tokyo\/<br>https:\/\/fukugyouhistory.tokyo\/?page_id=535<br>https:\/\/fukugyouhistory.tokyo\/?page_id=12<br>https:\/\/fukugyouhistory.tokyo\/?page_id=419<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" sizes=\"(max-width: 661px) 100vw, 661px\" src=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-291.png\" alt=\"\" class=\"wp-image-1190\" width=\"404\" height=\"211\" srcset=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-291.png 661w, https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-291-300x157.png 300w\" \/><\/figure>\n\n\n\n<p>\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>!pip install qrcode<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>import qrcode\n\n# QR\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308bURL\u306e\u4e00\u89a7\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\nurls = open(\"urls.txt\", \"rt\", encoding=\"utf-8\")\n\nfrom IPython.display import Image,display_png\n\n# \u4e00\u6c17\u306bQR\u30b3\u30fc\u30c9\u3092\u751f\u6210\nfor url in urls:\n    img = qrcode.make(url, box_size=3)\n    display_png(img)\n    print(url)\n\n# \u30d5\u30a1\u30a4\u30eb\u3092\u9589\u3058\u308b\nurls.close()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" sizes=\"(max-width: 505px) 100vw, 505px\" src=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-305.png\" alt=\"\" class=\"wp-image-1193\" width=\"405\" height=\"424\" srcset=\"https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-305.png 505w, https:\/\/fukugyouhistory.tokyo\/wp-content\/uploads\/2023\/03\/image-305-286x300.png 286w\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u601d\u3063\u305f\u4ee5\u4e0a\u306b\u7c21\u5358\u306bQR\u30b3\u30fc\u30c9\u3063\u3066\u4f5c\u308c\u308b\u3082\u306e\u306a\u3093\u3067\u3059\u306d\u3002\u3073\u3063\u304f\u308a\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3053\u307e\u3067\u3001Python\u306e\u74b0\u5883\u69cb\u7bc9\u3001Python\u306e\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u30fb\u30b0\u30e9\u30d5\u63cf\u753b\u3001Python\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u8868\u793a\u30fb\u6642\u523b\u8a08\u7b97\u3092\u5b66\u7fd2\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u3001QR\u30b3\u30fc\u30c9\u306e\u4f5c\u6210\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":{"0":"post-1178","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python"},"_links":{"self":[{"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/1178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1178"}],"version-history":[{"count":13,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/1178\/revisions"}],"predecessor-version":[{"id":1206,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=\/wp\/v2\/posts\/1178\/revisions\/1206"}],"wp:attachment":[{"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fukugyouhistory.tokyo\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}