<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adisorn Khaokom</title>
    <description>The latest articles on DEV Community by Adisorn Khaokom (@wtigero).</description>
    <link>https://dev.to/wtigero</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4211632%2Fd8cef27b-aa18-4cdc-bb5d-919e4b25d28b.jpg</url>
      <title>DEV Community: Adisorn Khaokom</title>
      <link>https://dev.to/wtigero</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wtigero"/>
    <language>en</language>
    <item>
      <title>Your Mac already has OCR. d2md puts it in your terminal.</title>
      <dc:creator>Adisorn Khaokom</dc:creator>
      <pubDate>Tue, 27 Oct 2026 19:41:26 +0000</pubDate>
      <link>https://dev.to/wtigero/your-mac-already-has-ocr-d2md-puts-it-in-your-terminal-25c</link>
      <guid>https://dev.to/wtigero/your-mac-already-has-ocr-d2md-puts-it-in-your-terminal-25c</guid>
      <description>&lt;p&gt;Your Mac already has an OCR engine. d2md lets you use it from the terminal and get Markdown back.&lt;/p&gt;

&lt;p&gt;On macOS, the direct OCR mode uses Apple Vision. No API key. No extra OCR model to download. You just need the optional OCR dependencies.&lt;/p&gt;

&lt;p&gt;Here's the 42-second demo:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-2115163359125680215-966" src="https://platform.twitter.com/embed/Tweet.html?id=2115163359125680215"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-2115163359125680215-966');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2115163359125680215&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/adisornkhaokom/status/2115163359125680215" rel="noopener noreferrer"&gt;Watch the demo on X&lt;/a&gt; if the video doesn't load here.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real scan, with real mistakes
&lt;/h2&gt;

&lt;p&gt;I tried a scanned page from &lt;a href="https://commons.wikimedia.org/wiki/File:NASA_FACTS_B-2-64_TIROS_page_04.jpg" rel="noopener noreferrer"&gt;NASA FACTS about the TIROS satellite&lt;/a&gt;. It's a public-domain NASA document available through Wikimedia Commons.&lt;/p&gt;

&lt;p&gt;This was the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;d2md nasa.jpg &lt;span class="nt"&gt;--ocr&lt;/span&gt; &lt;span class="nt"&gt;--lang&lt;/span&gt; latin &lt;span class="nt"&gt;--stdout&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;latin&lt;/code&gt; means the Latin alphabet used in English. For a Thai document, use &lt;code&gt;--lang thai&lt;/code&gt;. Leave out &lt;code&gt;--lang&lt;/code&gt; to let d2md detect the script automatically.&lt;/p&gt;

&lt;p&gt;Part of the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;THE TIROS SYSTEM
The TIROS satellite is a cylindrical,
300-pound, 18-sided polygon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I've added line breaks to make that excerpt easier to read. Elsewhere on the page, OCR read &lt;code&gt;TV pictures&lt;/code&gt; as &lt;code&gt;IV pictures&lt;/code&gt;. So yes, check the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  More than English
&lt;/h2&gt;

&lt;p&gt;The demo also shows Thai, Japanese, Chinese, and Korean. Those are synthetic sample PDFs, and I ran OCR on each one. They aren't scans of real documents.&lt;/p&gt;

&lt;p&gt;The Japanese and Chinese results had mistakes elsewhere too. The video shows selected excerpts, not a full accuracy test.&lt;/p&gt;

&lt;p&gt;The run used local d2md 0.1.3. The PyPI release may differ. If you want to try the released OCR package, install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv tool &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"d2md[ocr]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use the Markdown in scripts, search, RAG, or give just the text you need to an AI tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/wtigero/d2md" rel="noopener noreferrer"&gt;Code and setup instructions on GitHub&lt;/a&gt;. It's open source and MIT-licensed.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>python</category>
      <category>ocr</category>
    </item>
  </channel>
</rss>
