{"id":126699,"date":"2024-12-19T09:17:17","date_gmt":"2024-12-19T00:17:17","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=126699"},"modified":"2024-12-19T09:17:17","modified_gmt":"2024-12-19T00:17:17","slug":"markitdown","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/markitdown\/","title":{"rendered":"MarkItDown - PDF\u3001PowerPoint\u3001Word\u3001Excel\u306a\u3069\u3055\u307e\u3056\u307e\u306a\u30d5\u30a1\u30a4\u30eb\u3092Markdown\u306b\u5909\u63db\u3067\u304d\u308bMicrosoft\u88fd\u30c4\u30fc\u30eb"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/12\/s_20241218_131304.jpg\" alt=\"\" width=\"943\" height=\"573\" class=\"aligncenter size-full wp-image-126700\" \/><\/p>\n<p>\u8aad\u307f\u3084\u3059\u304f\u3066\u66f8\u304d\u3084\u3059\u3044\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u8a00\u8a9e\u300cMarkdown\u300d\u3002<\/p>\n<p>\u6700\u8fd1\u306f\u3001Web\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u7ba1\u7406\u3084\u3001\u5404\u7a2e\u306e\u30a2\u30d7\u30ea\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u308b\u4e8b\u3082\u591a\u304f\u3001\u5229\u7528\u3067\u304d\u308b\u5834\u9762\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u672c\u65e5\u7d39\u4ecb\u3059\u308b\u300c<a href=\"https:\/\/github.com\/microsoft\/markitdown\">MarkItDown<\/a>\u300d\u306f\u3001PDF\u3084PowerPoint\u3001Word\u3001Excel\u306a\u3069\u3055\u307e\u3056\u307e\u306a\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092Markdown\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308bPython\u88fd\u306e\u30c4\u30fc\u30eb\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>Microsoft\u304c\u516c\u958b\u3057\u305f\u3082\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>PDF<\/li>\n<li>PowerPoint<\/li>\n<li>Word<\/li>\n<li>Excel<\/li>\n<li>\u753b\u50cf(EXIF\u30e1\u30bf\u30c7\u30fc\u30bf\u3068OCR)<\/li>\n<li>\u30aa\u30fc\u30c7\u30a3\u30aa(EXIF\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u97f3\u58f0\u306e\u66f8\u304d\u8d77\u3053\u3057)<\/li>\n<li>HTML<\/li>\n<li>\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8(CSV\u3001JSON\u3001XML)<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u4f7f\u7528\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>MarkItDown\u306e\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>MarkItDown\u306fPython\u88fd\u306e\u30c4\u30fc\u30eb\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<code>pip<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\npip install markitdown\r\n<\/pre>\n<p>\u9069\u5207\u306bPATH\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070<code>markitdown<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002\u5909\u63db\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u7b2c1\u5f15\u6570\u3068\u3057\u3066\u6e21\u305b\u3070Markdown\u306b\u5909\u63db\u3057\u305f\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<pre>\r\nmarkitdown path-to-file.pdf \r\n<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408\u306f\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\nmarkitdown path-to-file.pdf > document.md\r\n<\/pre>\n<p>cat\u3092\u4f7f\u3063\u3066\u30d1\u30a4\u30d7\u3067\u6e21\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\ncat path-to-file.pdf | markitdown\r\n<\/pre>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306aWord\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u63db\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/12\/s_20241218_134333.jpg\" alt=\"\" width=\"1091\" height=\"613\" class=\"aligncenter size-full wp-image-126702\" \/><\/p>\n<p>\u3059\u308b\u3068\u6b21\u306e\u3088\u3046\u306a\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/12\/s_20241218_134510.jpg\" alt=\"\" width=\"1091\" height=\"614\" class=\"aligncenter size-full wp-image-126703\" \/><\/p>\n<p>\u898b\u51fa\u3057\u3084\u7b87\u6761\u66f8\u304d\u304c\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>Python\u88fd\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067Python\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u547c\u3073\u51fa\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\nfrom markitdown import MarkItDown\r\n\r\nmd = MarkItDown()\r\nresult = md.convert(\"test.xlsx\")\r\nprint(result.text_content)\r\n<\/pre>\n<p>\u753b\u50cf\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306a\u3069Large Language Models\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001<code>llm_client<\/code>\u3068<code>llm_model<\/code>\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>\r\nfrom markitdown import MarkItDown\r\nfrom openai import OpenAI\r\n\r\nclient = OpenAI()\r\nmd = MarkItDown(llm_client=client, llm_model=\"gpt-4o\")\r\nresult = md.convert(\"example.jpg\")\r\nprint(result.text_content)\r\n<\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>MarkItDown\u306f\u5404\u7a2e\u30d5\u30a1\u30a4\u30eb\u3092Markdown\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308bPython\u30c4\u30fc\u30eb\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002Microsoft\u304c\u958b\u767a\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001Microsoft Office\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u5b89\u5b9a\u3057\u3066\u5909\u63db\u3067\u304d\u308b\u3053\u3068\u304c\u671f\u5f85\u3067\u304d\u305d\u3046\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/12\/s_20241218_114534.jpg\" alt=\"\" width=\"1280\" height=\"720\" class=\"aligncenter size-full wp-image-126704\" \/><\/p>\n<p>\u306a\u304a<a href=\"https:\/\/msftmd.replit.app\/\">\u3053\u306e\u30b5\u30a4\u30c8<\/a>\u3092\u5229\u7528\u3059\u308c\u3070Web\u30d6\u30e9\u30a6\u30b6\u3067\u6a5f\u80fd\u3092\u8a66\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8aad\u307f\u3084\u3059\u304f\u3066\u66f8\u304d\u3084\u3059\u3044\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u8a00\u8a9e\u300cMarkdown\u300d\u3002 \u6700\u8fd1\u306f\u3001Web\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u7ba1\u7406\u3084\u3001\u5404\u7a2e\u306e\u30a2\u30d7\u30ea\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u308b\u4e8b\u3082\u591a\u304f\u3001\u5229\u7528\u3067\u304d\u308b\u5834\u9762\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002 \u672c\u65e5\u7d39\u4ecb\u3059\u308b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":126700,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[2138,703],"class_list":["post-126699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-markdown","tag-python"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/126699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=126699"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/126699\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/126700"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=126699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=126699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=126699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}