aboutsummaryrefslogtreecommitdiff
path: root/build/posts/macos-convert-to-html
diff options
context:
space:
mode:
Diffstat (limited to 'build/posts/macos-convert-to-html')
-rw-r--r--build/posts/macos-convert-to-html/index.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/build/posts/macos-convert-to-html/index.html b/build/posts/macos-convert-to-html/index.html
index b45f0a2..47985c0 100644
--- a/build/posts/macos-convert-to-html/index.html
+++ b/build/posts/macos-convert-to-html/index.html
@@ -18,7 +18,7 @@
<main>
<h1 id="convert-files-to-html-with-macos-automator-quick-actions">Convert Files to HTML with macOS Automator Quick Actions</h1>
<p>2022-01-28</p>
-<p>Since a few people have reached out and thanked me for my previous post <a href="/batch-webp-conversion">Batch Converting Images to webp with macOS Automator</a>, I thought I would continue to share more of my own custom Automator Quick Actions. Today&#8217;s post will cover the ability to convert <em>any</em> text-based document into pure HTML.</p>
+<p>Since a few people have reached out and thanked me for my previous post <a href="/posts/batch-webp-conversion">Batch Converting Images to webp with macOS Automator</a>, I thought I would continue to share more of my own custom Automator Quick Actions. Today&#8217;s post will cover the ability to convert <em>any</em> text-based document into pure HTML.</p>
<p>I know - there are over 6 billion conversion apps that do this very same thing. But our way of doing it is <em>cooler</em>. Our conversion tool:</p>
<ul>
<li>Will run directly inside macOS Finder (right-click actions FTW)</li>
@@ -47,13 +47,15 @@
<p>Wait for everything to finish and you&#8217;re done!</p>
<h2 id="our-custom-automator-quick-action">Our Custom Automator Quick Action</h2>
<p>Next you&#8217;ll want to open the macOS Automator app and create a new &#8220;Quick Action&#8221; when given the prompt to do so.</p>
+<p><img src="/public/images/new-automator.webp" alt="Toggle prompt for new automation in macOS Automator" /></p>
+<p><em>After opening Automator, select &#8220;Quick Action&#8221; from the menu</em></p>
<p>Now do the following (reference the image further below to make sure your parameters match):</p>
<ol>
-<li>Set &#8220;Workflow receives current&#8221; to documents in any application</li>
+<li>Set &#8220;Workflow receives current&#8221; to <strong>documents</strong> in <strong>any application</strong></li>
<li>In the search bar type in &#8220;Run Shell Script&#8221;</li>
<li>Drag-and-drop the &#8220;Run Shell Script&#8221; from the left pane into the right pane</li>
-<li>Set the &#8220;Shell&#8221; parameter to &#47;bin&#47;bash</li>
-<li>Set &#8220;Pass input&#8221; as as arguments</li>
+<li>Set the &#8220;Shell&#8221; parameter to <strong>&#47;bin&#47;bash</strong></li>
+<li>Set &#8220;Pass input&#8221; as <strong>as arguments</strong></li>
</ol>
<p>Once all that is done, simply paste the following in the open text field within the &#8220;Run Shell Script&#8221; item:</p>
<pre><code>for f in "$@"
@@ -62,16 +64,23 @@ do
done
</code></pre>
<p>If you&#8217;ve done everything correctly it should look something like this:</p>
+<p><img src="/public/images/new-automator-2.webp" alt="Automator quick action details for converting to HTML" /></p>
<p>Save this new Quick Action (Name is something like &#8220;Convert to HTML&#8221; to keep things simple). That&#8217;s it! Amazing, right?</p>
<h2 id="time-to-convert">Time to Convert</h2>
<p>Now it is finally time to see our Quick Action is <em>action</em>! Navigate to any document file in a Finder window and follow along.</p>
<ol>
-<li>First, right-click on the file you wish to convert. (<a href="#fig-1">Figure 1</a>)</li>
+<li>First, right-click on the file you wish to convert. See Fig.1)</li>
<li>In the pop-up container, scroll down and hover over <code>Quick Actions</code>.</li>
-<li>A secondary pop-out will appear. Look for the action <code>Convert File to HTML</code> and click it. (<a href="#fig-2">Figure 2</a>)</li>
+<li>A secondary pop-out will appear. Look for the action <code>Convert File to HTML</code> and click it. See Fig.2)</li>
</ol>
+<p><img src="/public/images/macos-convert-1.webp" alt="A markdown file in macOS Finder" /></p>
+<p><em>Fig 1: Finding and right-clicking on your desired file</em></p>
+<p><img src="/public/images/macos-convert-2.webp" alt="Convert to HTML action selection" /></p>
+<p><em>Fig 2: From the &#8220;Quick Actions&#8221; menu, select &#8220;Convert to HTML&#8221;</em></p>
<p>If everything was set up properly (and depending on the size of the file) you should see your converted HTML file show up right next to your existing document. Time to celebrate!</p>
<p>Don&#8217;t forget - you can also <em>batch</em> convert multiple files and multiple file <em>types</em> at once. The possibilities are endless!</p>
+<p><img src="/public/images/macos-convert-3.webp" alt="Finder window showing a Markdown file and an HTML file" /></p>
+<p><em>Our converted document is now available in HTML. Absolutely glorious.</em></p>
<h2 id="no-limits">No Limits</h2>
<p>Although this article has mainly focused on converting documents to HTML, <code>pandoc</code> is so powerful you could do any number of conversions. Re-using these steps above, you have the ability to make as many different conversion quick actions as your heart desires!</p>
<p>Have fun converting!</p>