{"id":11401,"date":"2026-05-30T09:21:45","date_gmt":"2026-05-30T00:21:45","guid":{"rendered":"https:\/\/www.trimir.net\/?p=11401"},"modified":"2026-05-30T09:21:45","modified_gmt":"2026-05-30T00:21:45","slug":"drafts-%ed%98%84%ec%9e%ac-%ec%9c%84%ec%b9%98%ec%99%80-%eb%82%a0%ec%94%a8-%ec%a0%95%eb%b3%b4","status":"publish","type":"post","link":"https:\/\/www.trimir.net\/?p=11401","title":{"rendered":"Drafts &#8211; \ud604\uc7ac \uc704\uce58\uc640 \ub0a0\uc528 \uc815\ubcf4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/getdrafts.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Drafts<\/a> \uc571\uc5d0\uc11c \ubc84\ud2bc\uc744 \ub9cc\ub4e4\uc5b4 \uc544\ub798 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ucf54\ub4dc\ub97c \uc9c0\uc815\ud558\uc5ec \ud604\uc7ac \uc704\uce58\uc5d0\uc11c \uc8fc\uc18c \uc815\ubcf4\uc640 \ub0a0\uc528 \uc815\ubcf4\ub97c \uac00\uc838\uc624\ub294 \uac78 \ub9cc\ub4e4\uc5b4\ubcf4\uc558\ub2e4.<br>\ud074\ub85c\ub4dc\uc640 \uc81c\ubbf8\ub098\uc774\uc640 \ucc57\uc9c0\ud53c\ud2f0\ub97c \ub3d9\uc2dc\uc5d0 \uc0ac\uc6a9\ud588\ub294\ub370, \ub124\uc774\ubc84 api \uc8fc\uc18c\uac00 \ubc14\ub00c\ub294 \ubd80\ubd84\uc774 \ubc18\uc601\ub418\uc5b4 \uc788\uc9c0\uc54a\uc544 \uaf64 \uc2dc\uac04\uc744 \ud5c8\ube44\ud588\ub2e4.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>``` JavaScript - Draft Code \n\n\/\/ \ub124\uc774\ubc84 API\nconst clientId = \"clientId\";\nconst clientSecret = \"clientSecret\";\n\n\/\/ \uc704\uce58 \uc815\ubcf4 \uac00\uc838\uc624\uae30 (\uc88c\ud45c)\nvar lat = draft.processTemplate(\"&#91;&#91;latitude]]\");\nvar lon = draft.processTemplate(\"&#91;&#91;longitude]]\");\n\n\/\/ \uc5ed \uc9c0\uc624\ucf54\ub529 (\uc88c\ud45c \u2192 \uc8fc\uc18c)\n\/\/ \ub124\uc774\ubc84 Reverse Geocoding REST API \ud638\ucd9c\nconst coords = `${lon},${lat}`; \/\/ \ub124\uc774\ubc84\ub294 \"\uacbd\ub3c4,\uc704\ub3c4\" \uc21c\uc11c \uc0ac\uc6a9\n\nlet http = HTTP.create();\n\nlet response = http.request({\n    \"url\": `https:\/\/maps.apigw.ntruss.com\/map-reversegeocode\/v2\/gc?coords=${coords}&amp;output=json&amp;orders=roadaddr`,\n    \"method\": \"GET\",\n    \"headers\": {\n        \"X-NCP-APIGW-API-KEY-ID\": clientId,\n        \"X-NCP-APIGW-API-KEY\": clientSecret\n    }\n});\n\nif (!response.success) {\n  alert(\"\ub370\uc774\ud130\ub97c \ubd88\ub7ec\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.\" + response.statusCode);\n  context.fail();\n};\n\nconst addr_data = JSON.parse(response.responseText);\nconst res = addr_data.results&#91;0];\n\nlet addr = `${res.region.area1.name} ${res.region.area2.name} ${res.region.area3.name} ${res.region.area4.name}`.trim();\n\nif (res.land) {\n    addr += ` ${res.land.name || \"\"} ${res.land.number1} ${res.land.addition0.value || \"\"}`;\n}\n\n\n\/\/ openstreetmap \uc774\uc6a9\uc2dc \uc544\ub798 \ucf54\ub4dc \uc774\uc6a9\n\nlet locationName = `${lat}, ${lon}`;\n\nconst http = HTTP.create();\n\nconst geoRes = http.request({\n\u00a0 url: `https:\/\/nominatim.openstreetmap.org\/reverse?lat=${lat}&amp;lon=${lon}&amp;format=json&amp;accept-language=ko`,\n\u00a0 method: \"GET\",\n\u00a0 headers: { \"User-Agent\": \"DraftsWeatherScript\/1.0\" }\n});\n\nif (geoRes.success) {\n\u00a0 const geo = JSON.parse(geoRes.responseText);\n\u00a0 const addr = geo.address;\n\n\u00a0 \/\/ \uad6c\/\ub3d9 \ub2e8\uc704\ub85c \ud45c\uc2dc (\uc5c6\uc73c\uba74 \uc0c1\uc704 \ud589\uc815\uad6c\uc5ed\uc73c\ub85c \ub300\uccb4)\n\u00a0 const parts = &#91;\n\u00a0 \u00a0 addr.city || addr.town || addr.county || addr.state,\n\u00a0 \u00a0 addr.suburb || addr.quarter || addr.neighbourhood || addr.village\n\u00a0 ].filter(Boolean);\n\n\u00a0 if (parts.length > 0) locationName = parts.join(\" \");\n}\n\n\/\/ ----------------------------------------\n\/\/ \uc5ec\uae30\uae4c\uc9c0 \ud604\uc7ac \uc704\uce58 \uae30\ubc18\uc73c\ub85c \uc8fc\uc18c \ubcc0\ud658 \uacfc\uc815\n\/\/ ----------------------------------------\n\n\n\n\/\/ \ub0a0\uc528 \uc870\ud68c - \uc88c\ud45c\ub85c \uc870\ud68c\n\/\/ app.displayInfoMessage(\"\u26c5 \ub0a0\uc528 \ub370\uc774\ud130 \ubd88\ub7ec\uc624\ub294 \uc911...\");\n\nconst weatherRes = http.request({\n  url: `https:\/\/api.open-meteo.com\/v1\/forecast?latitude=${lat}&amp;longitude=${lon}&amp;current=temperature_2m,relative_humidity_2m,apparent_temperature,weather_code,wind_speed_10m,precipitation&amp;daily=temperature_2m_max,temperature_2m_min,precipitation_sum,uv_index_max&amp;hourly=precipitation_probability&amp;timezone=auto&amp;forecast_days=1`,\n  method: \"GET\"\n});\n\nif (!weatherRes.success) {\n  alert(\"\ub0a0\uc528 \ub370\uc774\ud130\ub97c \ubd88\ub7ec\uc624\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.\");\n  context.fail();\n}\n\nconst data = JSON.parse(weatherRes.responseText);\nconst cur = data.current;\nconst daily = data.daily;\nconst hourly = data.hourly;\n\n\/\/ \ub370\uc774\ud130 \uac00\uacf5\nfunction getWeatherDesc(code) {\n  if (code === 0)  return \"\u2600\ufe0f \ub9d1\uc74c\";\n  if (code &lt;= 3)   return \"\ud83c\udf24 \uad6c\ub984 \uc870\uae08\";\n  if (code &lt;= 48)  return \"\ud83c\udf2b \uc548\uac1c\";\n  if (code &lt;= 67)  return \"\ud83c\udf27 \ube44\";\n  if (code &lt;= 77)  return \"\u2744\ufe0f \ub208\";\n  if (code &lt;= 82)  return \"\ud83c\udf26 \uc18c\ub098\uae30\";\n  if (code &lt;= 99)  return \"\u26c8 \ub1cc\uc6b0\";\n  return \"\ud83c\udf21\";\n}\n\nfunction getUVLevel(uv) {\n  if (uv &lt;= 2)  return \"\ub0ae\uc74c\";\n  if (uv &lt;= 5)  return \"\ubcf4\ud1b5\";\n  if (uv &lt;= 7)  return \"\ub192\uc74c\";\n  if (uv &lt;= 10) return \"\ub9e4\uc6b0 \ub192\uc74c\";\n  return \"\uc704\ud5d8\";\n}\n\n\/\/ \uc2dc\uac04\ub300\ubcc4 \uac15\uc218 \ud655\ub960\nconst morning   = Math.max(...hourly.precipitation_probability.slice(6, 12));\nconst afternoon = Math.max(...hourly.precipitation_probability.slice(12, 18));\nconst evening   = Math.max(...hourly.precipitation_probability.slice(18, 24));\n\nconst today = new Date().toLocaleDateString(\"ko-KR\", {\n  year: \"numeric\", month: \"long\", day: \"numeric\", weekday: \"long\"\n});\n\n\n\n\/\/ \ud604\uc7ac \uc2dc\uac04\uc744 \"2026-04-10 06:33\" \ud615\uc2dd\uc73c\ub85c \uac00\uc838\uc624\uae30\nvar timestamp = strftime(new Date(), \"%Y-%m-%d %H:%M\");\n\n\n\/\/ \ud14d\uc2a4\ud2b8 \uc0dd\uc131 (Markdown \ud615\uc2dd)\n\nconst weatherText =\n`\n> &#91;!info] **${addr}** \n> \ud83d\udcc5 ${timestamp}\n\n> ${getWeatherDesc(cur.weather_code)} \n> \n> \ud83c\udf21 **\uae30\uc628**\n> - \ud604\uc7ac: **${cur.temperature_2m} \u00b0C** (\uccb4\uac10 ${cur.apparent_temperature} \u00b0C)\n> - \ucd5c\uace0 \/ \ucd5c\uc800: **${daily.temperature_2m_max&#91;0]} \u00b0C \/ ${daily.temperature_2m_min&#91;0]} \u00b0C**\n> \n> \ud83c\udf27 **\uae30\uc0c1 \uc815\ubcf4**\n> - \ud83d\udca7 \uc2b5\ub3c4: ${cur.relative_humidity_2m} %\n> - \ud83c\udf2c \ud48d\uc18d: ${cur.wind_speed_10m} km\/h\n> - \u2600 \uc790\uc678\uc120: ${daily.uv_index_max&#91;0]} (${getUVLevel(daily.uv_index_max&#91;0])})\n> - \u2614 \uac15\uc218\ub7c9: ${daily.precipitation_sum&#91;0]} mm\n> \n> \u2614 **\uac15\uc218 \ud655\ub960**\n> - \uc624\uc804: ${morning} %\n> - \uc624\ud6c4: ${afternoon} %\n> - \uc800\ub141: ${evening} %\n\n---\n`;\n\n\/\/ Draft\uc5d0 \uc0bd\uc785\neditor.setText(weatherText + editor.getText());\neditor.setSelectedRange(weatherText.length, 0);\n\/\/ app.displayInfoMessage(\"\u2705 \ub0a0\uc528 \uc815\ubcf4\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4!\");\n\nlet content = draft.content;\napp.setClipboard(content);\n\n\n```<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Drafts \uc571\uc5d0\uc11c \ubc84\ud2bc\uc744 \ub9cc\ub4e4\uc5b4 \uc544\ub798 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ucf54\ub4dc\ub97c \uc9c0\uc815\ud558\uc5ec \ud604\uc7ac \uc704\uce58\uc5d0\uc11c \uc8fc\uc18c \uc815\ubcf4\uc640 \ub0a0\uc528 \uc815\ubcf4\ub97c \uac00\uc838\uc624\ub294 \uac78 \ub9cc\ub4e4\uc5b4\ubcf4\uc558\ub2e4.\ud074\ub85c\ub4dc\uc640 \uc81c\ubbf8\ub098\uc774\uc640 \ucc57\uc9c0\ud53c\ud2f0\ub97c \ub3d9\uc2dc\uc5d0 [&hellip;]<\/p>\n","protected":false},"author":1001002,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[],"class_list":["post-11401","post","type-post","status-publish","format-standard","hentry","category-log"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1357,"url":"https:\/\/www.trimir.net\/?p=1357","url_meta":{"origin":11401,"position":0},"title":"10.5 Leopard","author":"DS Lee","date":"October 28, 2007","format":false,"excerpt":"Mac OS X\uc758 6\ubc88\uc9f8 \ubc84\uc804. Leopard.\uc77c\ub2e8 Desktop \ubd80\ud130. \ubc14\ud0d5 \ud654\uba74\uc774 \ubc14\ub00c\uc5c8\ub2e4. \uc774\uac74 Time Machine\uc5d0 \ub9de\ucd98\ub4ef. Package\ub3c4 \uc774\ub7f0 \ubaa8\uc591\uc774\uc5c8\ub358\ub4ef. \ubc84\uc804\uc740 \ucd9c\uc2dc \uba70\uce60\uc804\ubd80\ud130 GM\uc774\ub77c\uace0 \ubd88\ub9ac\uc6b0\ub358 \ubc14\ub85c 9A581. Stack\uc740 \ub450\uac00\uc9c0\ub85c \ubcf4\uc5ec\uc9c4\ub2e4. \ucc98\uc74c \ubd24\uc744\ub54c\ub294 \uc6b0\uc640~ \ud588\ub294\ub370, \ub108\ubb34 \uc790\uc8fc \ub370\ubaa8\ub97c \ubd10\uc11c\uc778\uc9c0 \uc6d0\ub798 \uc788\ub294 \uae30\ub2a5\uc778 \uac83\ucc98\ub7fc \uac10\ub3d9\uc774 \uc5c6\ub2e4. \u3160\u3160 \uba54\ub274 \ubaa8\uc11c\ub9ac\uac00 \ub465\uae00\ub465\uae00...\uc815\ub9ac\uac00 \ub41c \ub4ef, \uc548 \ub41c\u2026","rel":"","context":"In &quot;Mac&quot;","block_context":{"text":"Mac","link":"https:\/\/www.trimir.net\/?cat=8"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/storage.googleapis.com\/wordpress-gallery\/2020\/11\/a9f1057c-menu_3538280443_o.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/storage.googleapis.com\/wordpress-gallery\/2020\/11\/a9f1057c-menu_3538280443_o.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/storage.googleapis.com\/wordpress-gallery\/2020\/11\/a9f1057c-menu_3538280443_o.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5403,"url":"https:\/\/www.trimir.net\/?p=5403","url_meta":{"origin":11401,"position":1},"title":"\ud0a4\ubcf4\ub4dc Keyboard","author":"DS Lee","date":"May 14, 2017","format":false,"excerpt":"X-KEY Bluetooth 3.0 keyboard | ThinkPad Compact USB Keyboard \ud55c\uc131 \ud0a4\ubcf4\ub4dc GO187 | Leopold FC660m Apple Bluetooth Wireless Keyboard | Logitech K380 Multi-Device Bluetooth Keyboard \uc0ac\uc9c4\uc5d0\ub294 \uc5c6\ub294 MS Arc Keyboard \uc560\ud50c \ud0a4\ubcf4\ub4dc\uc640 \uac19\uc740 \ubc30\uc5f4\uc774\ub77c \uad6c\uc785\ud588\uc5c8\ub358 X-KEY \ud0a4\ubcf4\ub4dc. \ubcf4\ub294\ub300\ub85c \uc2f8\uad6c\ub824 \ub290\ub08c\uc774 \ud30d\ud30d. \uc5f0\uacb0\uc774 \uc885\uc885 \ub04a\uae34\ub2e4. \uc720\uc77c\ud55c \uc7a5\uc810\uc740 \ud0a4\ubcf4\ub4dc \ubc30\uc5f4\uc774 \uac19\ub2e4\ub294\uac83! \uae30\uacc4\uc2dd\u2026","rel":"","context":"In &quot;Mac&quot;","block_context":{"text":"Mac","link":"https:\/\/www.trimir.net\/?cat=8"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.trimir.net\/wp-content\/uploads\/2017\/05\/IMG_3594-resized.jpg?fit=800%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.trimir.net\/wp-content\/uploads\/2017\/05\/IMG_3594-resized.jpg?fit=800%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.trimir.net\/wp-content\/uploads\/2017\/05\/IMG_3594-resized.jpg?fit=800%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.trimir.net\/wp-content\/uploads\/2017\/05\/IMG_3594-resized.jpg?fit=800%2C600&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":917,"url":"https:\/\/www.trimir.net\/?p=917","url_meta":{"origin":11401,"position":2},"title":"\uc720\uc2dc\ubbfc &#8211; \ud56d\uc18c\uc774\uc720\uc11c","author":"DS Lee","date":"February 27, 2006","format":false,"excerpt":"< \ud56d\uc18c\uc774\uc720\uc11c> \ubcf8 \uc801 : \uacbd\uc0c1\ubd81\ub3c4 \uc6d4\uc131\uad70 \u25cb\u25cb\uba74 \u25b3\u25b3\ub3d9 \uc8fc \uc18c : \uc11c\uc6b8\ud2b9\ubcc4\uc2dc \uad6c\ub85c\uad6c \uc2dc\ud765 1\ub3d9 \u25cb\u25cb\uc544\ud30c\ud2b8 11\ub3d9 \u25b3\u25b3\ud638 \uc131 \uba85 : \uc720 \uc2dc \ubbfc \uc0dd\ub144\uc6d4\uc77c : 1959\ub144 7\uc6d4 28\uc77c \uc8c4 \uba85 : \ud3ed\ub825\ud589\uc704\ub4f1 \ucc98\ubc8c\uc5d0 \uad00\ud55c \ubc95\ub960\uc704\ubc18 \uc694 \uc9c0 \ubcf8 \ud53c\uace0\uc778\uc740 1985\ub144 4\uc6d4 1\uc77c \uc11c\uc6b8\uc9c0\ubc29\ubc95\uc6d0 \ub0a8\ubd80\uc9c0\uc6d0\uc5d0\uc11c \ud3ed\ub825\ud589\uc704\ub4f1 \ucc98\ubc8c\uc5d0 \uad00\ud55c \ubc95\ub960\uc704\ubc18\uc73c\ub85c\u2026","rel":"","context":"With 3 comments","block_context":{"text":"With 3 comments","link":"https:\/\/www.trimir.net\/?p=917#comments"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":884,"url":"https:\/\/www.trimir.net\/?p=884","url_meta":{"origin":11401,"position":3},"title":"\ubbf8\uad6d\uc560\ub4e4\uc774 \ub300\ud654\ud560\ub54c \uc4f0\ub294\ub9d0","author":"DS Lee","date":"February 3, 2006","format":false,"excerpt":"1. \ub2f9\uadfc\uc774\uc9c0 You bet.\/ Absolutely. 2. \ub108\ub098 \uc798 \ud574 None of your business. 3. \ub4b7\ubd81\uce58\uc9c0\ub9c8 Thanks for the history lesson. 4. \uc5b4\uc81c \ud544\ub984\uc774 \ub04a\uacbc\uc5b4 I got blacked out yesterday. 5. \uadf8 \uc0ac\ub78c \uadf8\uac70 \ucc38 \uc798~ \ub410\ub2e4(\uadf8\uac8c\ub2f9\uc5f0\ud558\ub2e4). \uc324\ud1b5\uc774\ub2e4 He deserves it. 6. \uadf8\ub798 \ub2c8 \ud314\ub69d (\ub610\ub294 \ub2c8 X) \uad75\ub2e4 Okay, You\u2026","rel":"","context":"In &quot;English&quot;","block_context":{"text":"English","link":"https:\/\/www.trimir.net\/?cat=4"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/p4q7Ev-2XT","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/posts\/11401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/users\/1001002"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trimir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11401"}],"version-history":[{"count":1,"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/posts\/11401\/revisions"}],"predecessor-version":[{"id":11402,"href":"https:\/\/www.trimir.net\/index.php?rest_route=\/wp\/v2\/posts\/11401\/revisions\/11402"}],"wp:attachment":[{"href":"https:\/\/www.trimir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trimir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trimir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}