<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pandoc | Ukant Jadia</title><link>https://ukantjadia.github.io/tag/pandoc/</link><atom:link href="https://ukantjadia.github.io/tag/pandoc/index.xml" rel="self" type="application/rss+xml"/><description>Pandoc</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sat, 30 Dec 2023 14:22:57 +0530</lastBuildDate><image><url>https://ukantjadia.github.io/media/icon_hu5e29e1df12b63ca0c9252c8db4842f1b_8915_512x512_fill_lanczos_center_3.png</url><title>Pandoc</title><link>https://ukantjadia.github.io/tag/pandoc/</link></image><item><title>Markdown to Html Conversion</title><link>https://ukantjadia.github.io/post/markdown-to-html-conversion/</link><pubDate>Sat, 30 Dec 2023 14:22:57 +0530</pubDate><guid>https://ukantjadia.github.io/post/markdown-to-html-conversion/</guid><description>&lt;h1 id="conversion-of-markdownmd-to-html-markup-language">Conversion of Markdown(.md) to html markup language&lt;/h1>
&lt;ul>
&lt;li>get the &lt;code>pandoc&lt;/code>&lt;/li>
&lt;li>Use the following command&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-r" data-lang="r">&lt;span class="line">&lt;span class="cl"> &lt;span class="n">pandoc&lt;/span> &lt;span class="n">smaple_readme.md&lt;/span> &lt;span class="o">-&lt;/span>&lt;span class="n">t&lt;/span> &lt;span class="n">html&lt;/span> &lt;span class="o">-&lt;/span>&lt;span class="n">o&lt;/span> &lt;span class="n">sample_readme.html&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>In shell it would be written like&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">&lt;span class="nv">cat&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="k">$(&lt;/span>pandoc &lt;span class="nv">$1&lt;/span>.md -t html -o &lt;span class="nv">$1&lt;/span>.html &lt;span class="k">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>It will be run the loop with wildcard like&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl"> &lt;span class="k">for&lt;/span> i in ~/locat/.md/file/* &lt;span class="p">;&lt;/span> &lt;span class="k">do&lt;/span> &lt;span class="k">$(&lt;/span>var&lt;span class="k">)&lt;/span> &lt;span class="p">;&lt;/span> &lt;span class="k">done&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="modification">Modification&lt;/h1>
&lt;ul>
&lt;li>check extension of each file with if condition and print the non md file
like&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">if [ $1 -ne *.md ]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">then
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> echo &amp;#34;UNEXPECTED Document format $1 &amp;#34;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> continue
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">else:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> `further code`
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">fi
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>