<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Markdown on Salar Rahmanian</title><link>https://www.softinio.com/tags/markdown/</link><description>Recent content in Markdown on Salar Rahmanian</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 03 Mar 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.softinio.com/tags/markdown/index.xml" rel="self" type="application/rss+xml"/><item><title>Migrating my markdown notes from Obsidian to Apple Notes</title><link>https://www.softinio.com/til/migrating-my-markdown-notes-from-obsidian-to-apple-notes/</link><pubDate>Sun, 03 Mar 2024 00:00:00 +0000</pubDate><guid>https://www.softinio.com/til/migrating-my-markdown-notes-from-obsidian-to-apple-notes/</guid><description>&lt;p&gt;So I wanted to migrate my markdown notes from Obsidian to Apple Notes. Apple Notes did not support import from markdown. I also wanted to maintain the folder structure.&lt;/p&gt;
&lt;p&gt;For every file I also wanted to maintain the title of the note. I wanted to prepend the title to the HTML file so that when I import the HTML file to Apple Notes, the title is correctly set. I did this by adding the file name (without the extension) as an &lt;code&gt;h1&lt;/code&gt; tag to the HTML file.&lt;/p&gt;</description></item><item><title>Converting HTML to Markdown using Markdownify</title><link>https://www.softinio.com/til/converting-html-to-markdown-using-markdownify/</link><pubDate>Tue, 26 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.softinio.com/til/converting-html-to-markdown-using-markdownify/</guid><description>&lt;p&gt;I had some HTML content that I wanted to convert to markdown.&lt;/p&gt;
&lt;p&gt;The simplest tool I found to do this effectively was a python utility called &lt;a href="https://pypi.org/project/markdownify/"&gt;Markdownify&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I used Nix Shell to install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nix-shell -p python311Packages.markdownify
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And to do the conversion I just did:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;markdownify myfile.html &amp;gt; myfile.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;where &lt;code&gt;myfile.html&lt;/code&gt; is the name of the file I wanted to convert and &lt;code&gt;myfile.md&lt;/code&gt; in the name of the markdown file it got converted to.&lt;/p&gt;</description></item></channel></rss>