<?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: Aahnik Daw</title>
    <description>The latest articles on DEV Community by Aahnik Daw (@aahnik).</description>
    <link>https://dev.to/aahnik</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F453833%2Ffa5040a4-bb85-4275-9cf2-95c8cf64fc4b.png</url>
      <title>DEV Community: Aahnik Daw</title>
      <link>https://dev.to/aahnik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aahnik"/>
    <language>en</language>
    <item>
      <title>Python program to automate custom telegram chat forwarding</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Thu, 03 Jun 2021 03:44:19 +0000</pubDate>
      <link>https://dev.to/aahnik/python-program-to-automate-custom-telegram-chat-forwarding-21bi</link>
      <guid>https://dev.to/aahnik/python-program-to-automate-custom-telegram-chat-forwarding-21bi</guid>
      <description>&lt;p&gt;Github Link &lt;a href="https://github.com/aahnik/tgcf"&gt;tgcf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The content of this article has been removed, because they no longer match with the latest version. Check the github link above.&lt;/p&gt;

&lt;p&gt;The ultimate tool to automate telegram message forwarding.&lt;/p&gt;

&lt;p&gt;You can forward messages from a source chat to a destination chat. You can configure tgcf to do exactly what you need. &lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>telegram</category>
    </item>
    <item>
      <title>Top 14 Python Projects to learn GitHub Actions 🚀</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Fri, 16 Apr 2021 18:31:37 +0000</pubDate>
      <link>https://dev.to/aahnik/top-14-python-projects-to-learn-github-actions-ge5</link>
      <guid>https://dev.to/aahnik/top-14-python-projects-to-learn-github-actions-ge5</guid>
      <description>&lt;p&gt;GitHub actions help developers to automate workflows. You can run tests, build and publish packages, check coverage, lint the codebase, and do tons of other cool stuff, using GitHub actions.&lt;/p&gt;

&lt;p&gt;Some of the best and most popular python projects are using GitHub actions to automate their workflow.&lt;/p&gt;

&lt;p&gt;GitHub actions are defined using a yaml file under the &lt;code&gt;.github/workflows&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;If you are completely new to GitHub actions, the official documentation can help: &lt;a href="https://docs.github.com/en/actions"&gt;https://docs.github.com/en/actions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The best way to learn is by seeing examples. Below is the compilation of links to great GitHub action workflows.&lt;/p&gt;

&lt;p&gt;(the order of listing is completely random)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;poetry&lt;/strong&gt;  &lt;a href="https://github.com/python-poetry/poetry/tree/master/.github/workflows"&gt;https://github.com/python-poetry/poetry/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;fastapi&lt;/strong&gt; &lt;a href="https://github.com/tiangolo/fastapi/tree/master/.github/workflows"&gt;https://github.com/tiangolo/fastapi/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;mkdocs&lt;/strong&gt; &lt;a href="https://github.com/mkdocs/mkdocs/tree/master/.github/workflows"&gt;https://github.com/mkdocs/mkdocs/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;material mkdocs&lt;/strong&gt; &lt;a href="https://github.com/squidfunk/mkdocs-material/tree/master/.github/workflows"&gt;https://github.com/squidfunk/mkdocs-material/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;typer&lt;/strong&gt; &lt;a href="https://github.com/tiangolo/typer/tree/master/.github/workflows"&gt;https://github.com/tiangolo/typer/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;pytest&lt;/strong&gt; &lt;a href="https://github.com/pytest-dev/pytest/tree/main/.github/workflows"&gt;https://github.com/pytest-dev/pytest/tree/main/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;pylint&lt;/strong&gt; &lt;a href="https://github.com/PyCQA/pylint/tree/master/.github/workflows"&gt;https://github.com/PyCQA/pylint/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;mypy&lt;/strong&gt; &lt;a href="https://github.com/python/mypy/tree/master/.github/workflows"&gt;https://github.com/python/mypy/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;requests&lt;/strong&gt; &lt;a href="https://github.com/psf/requests/tree/master/.github/workflows"&gt;https://github.com/psf/requests/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;aiohttp&lt;/strong&gt; &lt;a href="https://github.com/aio-libs/aiohttp/tree/master/.github/workflows"&gt;https://github.com/aio-libs/aiohttp/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;black&lt;/strong&gt; &lt;a href="https://github.com/psf/black/tree/master/.github/workflows"&gt;https://github.com/psf/black/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;python-youtube&lt;/strong&gt; &lt;a href="https://github.com/sns-sdks/python-youtube/tree/master/.github/workflows"&gt;https://github.com/sns-sdks/python-youtube/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;pygithub&lt;/strong&gt; &lt;a href="https://github.com/PyGithub/PyGithub/tree/master/.github/workflows"&gt;https://github.com/PyGithub/PyGithub/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;coverage&lt;/strong&gt; &lt;a href="https://github.com/nedbat/coveragepy/tree/master/.github/workflows"&gt;https://github.com/nedbat/coveragepy/tree/master/.github/workflows&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>python</category>
      <category>discuss</category>
      <category>testing</category>
    </item>
    <item>
      <title>I got a 50$ gift from dev.to, and here it is 😍</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Thu, 15 Apr 2021 03:15:21 +0000</pubDate>
      <link>https://dev.to/aahnik/i-got-a-50-gift-from-dev-to-and-here-it-is-ggh</link>
      <guid>https://dev.to/aahnik/i-got-a-50-gift-from-dev-to-and-here-it-is-ggh</guid>
      <description>&lt;p&gt;I did not imagine that a simple article like sending an email would perform so well. Similar tutorials are in n no. of places on the internet. But still, people loved my article.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/aahnik" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F453833%2Ffa5040a4-bb85-4275-9cf2-95c8cf64fc4b.png" alt="aahnik"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/aahnik/how-to-send-emails-with-python-simply-explained-for-beginners-hea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How to send emails with Python? Simply explained for beginners&lt;/h2&gt;
      &lt;h3&gt;Aahnik Daw ・ Apr 7 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#email&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#discuss&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;This article 👆 reached the &lt;a href="https://dev.to/devteam/the-7-most-popular-dev-posts-from-the-past-week-4njl"&gt;top seven&lt;/a&gt; for the week, and dev.to sent me this email.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1m5hsezqsrazegr1ixw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1m5hsezqsrazegr1ixw.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am excited to have this badge,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbumr3u2l56q9zwadsbfx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbumr3u2l56q9zwadsbfx.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I thought, let me give the code back to the community. So here it is &lt;/p&gt;

&lt;p&gt;&lt;code&gt;dev-top7-acmewh&lt;/code&gt; , &lt;/p&gt;

&lt;p&gt;the first person to redeem it, gets 50$ worth of stuff from the &lt;a href="https://shop.dev.to"&gt;shop.dev.to&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have redeemed the code, please comment below, with what you bought. I would love to know. &lt;/p&gt;

&lt;p&gt;Thank you for the love.&lt;/p&gt;

&lt;p&gt;I am &lt;a href="https://github.com/aahnik" rel="noopener noreferrer"&gt;@aahnik&lt;/a&gt; on GitHub. If you are feeling bored, do check out my projects, and hit a few stars.&lt;/p&gt;

&lt;p&gt;Thank you again.&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>discuss</category>
      <category>news</category>
    </item>
    <item>
      <title>I want to build a Python wrapper for an API, how should I approach it?</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Mon, 12 Apr 2021 02:01:45 +0000</pubDate>
      <link>https://dev.to/aahnik/i-want-to-build-a-python-wrapper-for-an-api-how-should-i-approach-it-pk4</link>
      <guid>https://dev.to/aahnik/i-want-to-build-a-python-wrapper-for-an-api-how-should-i-approach-it-pk4</guid>
      <description>&lt;p&gt;I am planning to build a python wrapper around a rest API.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I want to support friendly functions, with autocompletion in the editor.&lt;/li&gt;
&lt;li&gt;I want 100% test coverage&lt;/li&gt;
&lt;li&gt;I want the package to be modular, so that, any changes to API, can be easily reflected&lt;/li&gt;
&lt;li&gt;I want to support both async and normal methods
(the core will be implemented thru async, but there will be a wrapper for those who don't want to use async)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;library&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Api&lt;/span&gt;

&lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Api&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;do_job&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;thing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_thing&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;thing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;do_job&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;library.sync&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Api&lt;/span&gt;

&lt;span class="n"&gt;thing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_thing&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;thing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the data that will be passed to the functions should be validated. planning to use pydantic.&lt;/p&gt;

&lt;p&gt;planning to create a sub-package &lt;code&gt;library.models&lt;/code&gt; to contain all the modules defining the models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;how should I design the entire thing? how should I structure the project?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;best practices? guides?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>help</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Are you procrastinating?</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Sun, 11 Apr 2021 08:31:17 +0000</pubDate>
      <link>https://dev.to/aahnik/are-you-procrastinating-236e</link>
      <guid>https://dev.to/aahnik/are-you-procrastinating-236e</guid>
      <description>&lt;p&gt;Are you procrastinating? This playlist gives you the ultimate tools to take control of your life.&lt;/p&gt;

&lt;p&gt;Watch the videos. Rewatch. Implement. Think. Reflect. Watch again. Iterate.&lt;/p&gt;

&lt;p&gt;Be patient, and you will be able to kill the monster.&lt;/p&gt;




&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/arj7oStGLkU"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/GTQ2xDNlLf8"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/km4pOGd_lHw"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1-VAGGCkoAM"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/irp5ghCVNAM"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/yBP1VjO9RSE"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/cRpQOXV2cFg"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WAe-giSW3Zw"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/bLp9EimaEQI"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4x7MkLDGnu8"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pKyHX0zqynk"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Y82KNevhkkg"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ilwork_mktE"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/jAS5zsi7zck"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/sBfng6Jd4Cc"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/o7w5r5PfBKo"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1KDB42qGT-8"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ii86yxzeDyk"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/iDbdXTMnOmE"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/T79nFQlDXXk"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/tReHWgBup40"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1xoCARmG7AM"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/RLylcMjvmpE"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Hu4Yvq-g7_Y"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/52lZmIafep4"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/PFo9-7VX2K8"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Lp7E973zozc"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pXEl0R1BX-g"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pWlOyuPPGiw"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/jW0JtF7ZcMw"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Y-iUOgQdA3Y"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ireD2dDk7_c"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ireD2dDk7_c"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/uRKeeelqWxw"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xguo_tvEoJs"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/5J6jAC6XxAI"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/HbxTkvfIOIg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/playlist?list=PLSTrsq_DvEghR5B_JwY3rUyEX1FhKXT2A"&gt;Link to the playlist&lt;/a&gt; on YouTube.&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How do you bookmark and take notes?</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Fri, 09 Apr 2021 15:31:49 +0000</pubDate>
      <link>https://dev.to/aahnik/how-do-you-bookmark-and-take-notes-2h45</link>
      <guid>https://dev.to/aahnik/how-do-you-bookmark-and-take-notes-2h45</guid>
      <description>&lt;p&gt;As developers, we encounter a huge amount of information every single day. &lt;/p&gt;

&lt;p&gt;GitHub repositories, dev.to articles, Medium articles, YouTube videos, blog posts on independent websites, courses, documentation of libraries we are using, and the list goes on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3cxdzinxzdierqto2sht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3cxdzinxzdierqto2sht.png" alt="platform jungle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need a &lt;strong&gt;simple&lt;/strong&gt; and &lt;strong&gt;efficient&lt;/strong&gt; system to bookmark or save interesting stuff. Sometimes we also need to &lt;strong&gt;note down&lt;/strong&gt; things we learned.&lt;/p&gt;

&lt;p&gt;We have all been there. Google searching a piece of content that we encountered earlier, and not getting that easily, as we forgot the specifics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Saving everything in a centralized system, with proper categorization and tagging, can help us find stuff faster.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are many ways to do it. Like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using the native &lt;strong&gt;bookmarking&lt;/strong&gt; feature of our &lt;strong&gt;browsers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platform-specific&lt;/strong&gt; ways like &lt;em&gt;Star&lt;/em&gt; on GitHub or &lt;em&gt;Save&lt;/em&gt; on dev.to or &lt;em&gt;Save to Watch Later&lt;/em&gt; on YouTube.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;GitHub repository&lt;/strong&gt; can be used to store all the notes as markdown files. A bookmark is also a note. All notes are organized into topic-wise sub-folders.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;GitHub issues&lt;/strong&gt; to save the content. They are fast to create, and also taggable. GitHub offers a very efficient search across issues.&lt;/li&gt;
&lt;li&gt;A database in a platform like &lt;strong&gt;Notion&lt;/strong&gt; is a great choice. You can use &lt;a href="https://chrome.google.com/webstore/detail/save-to-notion/ldmmifpegigmeammaeckplhnjbbpccmm" rel="noopener noreferrer"&gt;Save to Notion&lt;/a&gt; browser extension to save content to it.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using a &lt;strong&gt;bookmarking software&lt;/strong&gt; (most of which are paid) for example :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://raindrop.io/" rel="noopener noreferrer"&gt;raindrop.io&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://getpocket.com/" rel="noopener noreferrer"&gt;pocket&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and so on.&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;What system or tools do you use to bookmark and take notes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Is it free and open source?&lt;/p&gt;

&lt;p&gt;Did you ever change your technique? Are you satisfied with your technique?&lt;/p&gt;

&lt;p&gt;What are the pros and cons of the tool/technique you use?&lt;/p&gt;

&lt;p&gt;Please answer these questions in the comments. I would love to know how people deal with this thing.&lt;/p&gt;

</description>
      <category>help</category>
      <category>discuss</category>
      <category>programming</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Compose an email with markdown and send it with a Python script</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Fri, 09 Apr 2021 04:59:10 +0000</pubDate>
      <link>https://dev.to/aahnik/compose-email-with-markdown-and-send-it-with-a-python-script-9d</link>
      <guid>https://dev.to/aahnik/compose-email-with-markdown-and-send-it-with-a-python-script-9d</guid>
      <description>&lt;h2&gt;
  
  
  Recap
&lt;/h2&gt;

&lt;p&gt;In the previous article of this series, we had written a simple script to send an email with Python.&lt;/p&gt;

&lt;p&gt;Let's recap the steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we first imported &lt;code&gt;SMTP&lt;/code&gt; class from &lt;code&gt;smptplib&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;we then defined the variables &lt;code&gt;HOST&lt;/code&gt;,&lt;code&gt;PORT&lt;/code&gt;,&lt;code&gt;SENDER&lt;/code&gt; and &lt;code&gt;PASSWORD&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;we then created an object of the &lt;code&gt;SMTP&lt;/code&gt; class named &lt;code&gt;server&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now call multiple server functions: 

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;connect&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;ehlo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;starttls&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ehlo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;login&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;define the &lt;code&gt;RECIPIENT&lt;/code&gt; and &lt;code&gt;MESSAGE&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;send the email by calling &lt;code&gt;server.sendmail&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To see the code, read my previous article.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/aahnik" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F453833%2Ffa5040a4-bb85-4275-9cf2-95c8cf64fc4b.png" alt="aahnik"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/aahnik/how-to-send-emails-with-python-simply-explained-for-beginners-hea" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How to send emails with Python? Simply explained for beginners&lt;/h2&gt;
      &lt;h3&gt;Aahnik Daw ・ Apr 7 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#email&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#discuss&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Let's Enhance
&lt;/h2&gt;

&lt;p&gt;In this article, we will take further what we have learned in the previous article.&lt;/p&gt;

&lt;p&gt;We will add some &lt;strong&gt;new features&lt;/strong&gt; to our script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rich-text via markdown.&lt;/li&gt;
&lt;li&gt;setting a subject of the email.&lt;/li&gt;
&lt;li&gt;using an alias name for the sender (you can set the sender's display name to be anything, like "Mr. Bean", irrespective of your actual email address).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7m587kwr82reydz857j0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7m587kwr82reydz857j0.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Markdown
&lt;/h2&gt;

&lt;p&gt;In the modern world, plain text looks boring. Professional emails have some logo, or title image, along with the richly formatted text.&lt;/p&gt;

&lt;p&gt;Writing HTML is time-consuming, so we will use the markdown format, to compose beautiful emails.&lt;/p&gt;

&lt;p&gt;If you are not familiar with the markdown formatting, then you should &lt;a href="https://www.markdownguide.org/cheat-sheet" rel="noopener noreferrer"&gt;learn it&lt;/a&gt; because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it is used to write posts in dev.to&lt;/li&gt;
&lt;li&gt;it is commonly used to write the README file for your GitHub projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To deal with markdown in python, we need the &lt;code&gt;markdown&lt;/code&gt; package.&lt;/p&gt;

&lt;p&gt;So install it via &lt;code&gt;pip&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

❯ pip &lt;span class="nb"&gt;install &lt;/span&gt;Markdown


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Write the code
&lt;/h2&gt;

&lt;p&gt;Let's say we will write our email in a file called &lt;code&gt;compose.md&lt;/code&gt;. Our script should send the content of that file as an email to our recipient.&lt;/p&gt;

&lt;p&gt;Delete the old &lt;code&gt;send.py&lt;/code&gt; that we have written last day. Let's refactor our code, to make it more mature and maintainable.&lt;/p&gt;

&lt;p&gt;Let's define all our variables in a file called &lt;code&gt;settings.py&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# settings.py
&lt;/span&gt;
&lt;span class="n"&gt;HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;smtp.gmail.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;587&lt;/span&gt;
&lt;span class="n"&gt;SENDER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;youremail@gmail.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;PASSWORD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your12434(893**!@password&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;RECIPIENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;some@example.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;MESSAGE_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;compose.md&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;DISPLAY_NAME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Mr. Bean&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now let's write down the &lt;code&gt;send.py&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# send.py
&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;email.mime.multipart&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;MIMEMultipart&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;email.mime.text&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;MIMEText&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smtplib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SMTP&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;markdown&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DISPLAY_NAME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PASSWORD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="n"&gt;RECIPIENT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MESSAGE_FILE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MESSAGE_FILE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SMTP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ehlo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;starttls&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ehlo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PASSWORD&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;multipart_msg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MIMEMultipart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;alternative&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Subject&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;From&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DISPLAY_NAME&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; &amp;lt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;To&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;RECIPIENT&lt;/span&gt;

&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;
&lt;span class="n"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;part1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MIMEText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;plain&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;part2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MIMEText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;part1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;part2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;RECIPIENT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;multipart_msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;as_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Sent email successfully!&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;




&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That's it. Coding is over. Now let's run the script &lt;code&gt;send.py&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

❯ python send.py
Sent email successfully!


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Your output will look like this 👆 if you did everything alright. The email will be sitting right in the recipient's inbox.&lt;/p&gt;




&lt;p&gt;I am &lt;a href="https://aahnik.dev" rel="noopener noreferrer"&gt;Aahnik Daw&lt;/a&gt; and you can follow me on &lt;a href="https://github.com/aahnik" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and &lt;a href="https://dev.to/aahnik"&gt;dev.to&lt;/a&gt; to stay updated with my latest repos and articles.&lt;/p&gt;

</description>
      <category>python</category>
      <category>discuss</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Declutter your Downloads folder with Python 😎</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Thu, 08 Apr 2021 13:27:41 +0000</pubDate>
      <link>https://dev.to/aahnik/declutter-your-downloads-folder-with-python-1a4p</link>
      <guid>https://dev.to/aahnik/declutter-your-downloads-folder-with-python-1a4p</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;We download tons of files daily from the internet.&lt;/p&gt;

&lt;p&gt;If you are a Windows user, they most probably land up in your Desktop folder by default, making it look like a mess.&lt;/p&gt;

&lt;p&gt;For Unix users, it's generally the &lt;code&gt;~/Downloads&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;Having all the files in one folder makes it hard to navigate. It takes more time to reach the desired file. And &lt;strong&gt;it simply looks bad&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One great way of organizing files is by their mime type. That is, all the images go to one folder, all the pdfs to another, and so on.&lt;/p&gt;

&lt;p&gt;So I made a simple tool, that can declutter your downloads folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  dirganize
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pypi.org/project/dirganize/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to install?
&lt;/h2&gt;

&lt;p&gt;Make sure you have &lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;python&lt;/a&gt; and &lt;a href="https://pip.pypa.io/en/stable/installing/" rel="noopener noreferrer"&gt;pip&lt;/a&gt; installed in your system.&lt;/p&gt;

&lt;p&gt;The package &lt;code&gt;dirganize&lt;/code&gt; is published to the Python Package Index. So, why wait, you can easily install it with a single &lt;code&gt;pip&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ pip &lt;span class="nb"&gt;install &lt;/span&gt;dirganize
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use ?
&lt;/h2&gt;

&lt;p&gt;Navigate into the directory, which you want to organize, and run the &lt;code&gt;dirganize&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ &lt;span class="nb"&gt;cd &lt;/span&gt;Downloads
❯ dirganize
Creating mapping  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Moving files  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it. Your folder is organized. &lt;/p&gt;

&lt;p&gt;Run the &lt;code&gt;ls&lt;/code&gt; command (or &lt;code&gt;dir&lt;/code&gt; for Windows) before and after executing &lt;code&gt;dirganize&lt;/code&gt; to see the magic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5969yyq6a44jychm812.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5969yyq6a44jychm812.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Your rules
&lt;/h2&gt;

&lt;p&gt;Your folder. Your rules.&lt;/p&gt;

&lt;p&gt;Want to change the rules? I mean the rules that govern which file goes to which folder. &lt;/p&gt;

&lt;p&gt;Then simply, put a &lt;code&gt;.dirganize.yml&lt;/code&gt; file inside the folder to override the default configuration.&lt;/p&gt;

&lt;p&gt;A yaml file is basically converted to a python dictionary by &lt;code&gt;dirganize&lt;/code&gt;. The default dictionary is overwritten by the user-defined configuration (when available).&lt;/p&gt;

&lt;p&gt;I am &lt;a href="https://aahnik.dev" rel="noopener noreferrer"&gt;Aahnik Daw&lt;/a&gt; and you can follow me on &lt;a href="https://github.com/aahnik" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and &lt;a href="https://dev.to/aahnik"&gt;dev.to&lt;/a&gt; to stay updated with my latest repos and articles.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to send emails with Python? Simply explained for beginners</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Wed, 07 Apr 2021 18:29:37 +0000</pubDate>
      <link>https://dev.to/aahnik/how-to-send-emails-with-python-simply-explained-for-beginners-hea</link>
      <guid>https://dev.to/aahnik/how-to-send-emails-with-python-simply-explained-for-beginners-hea</guid>
      <description>&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Sending emails is one of the most common functionalities in the modern world. This article is not about how email works under the hood, but how you can easily send an email using a python script.&lt;/p&gt;

&lt;p&gt;Why use Python to send an email when you can use Gmail?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;when you know how to send an email with python, you can automate a lot of boring stuff&lt;/li&gt;
&lt;li&gt;you can also integrate the email feature with your other applications&lt;/li&gt;
&lt;li&gt;send out your newsletter for free&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and the use cases are endless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;To follow this tutorial you must have python 3.6 + installed in your system. At the time I am writing this article, I recommend using python 3.9.3 (the latest stable version).&lt;/p&gt;

&lt;p&gt;Open your terminal (also called command prompt in windows), and type &lt;code&gt;python --version&lt;/code&gt;, and you should get something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ python &lt;span class="nt"&gt;--version&lt;/span&gt;
Python 3.9.0+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also need to have an email server running. I will not delve deep into behind-the-scenes technology in this article. If you have a Gmail account (or any other email provider), then you are good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing &lt;code&gt;smtplib&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The Simple Mail Transfer Protocol is an internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages.&lt;/p&gt;

&lt;p&gt;Python provides &lt;a href="https://docs.python.org/3/library/smtplib.html"&gt;smptplib&lt;/a&gt; which is a library used to send mail to any Internet machine with an SMTP or ESMTP listener daemon.&lt;/p&gt;

&lt;p&gt;As &lt;code&gt;smtplib&lt;/code&gt; is a part of the python standard library, you don't have to install anything to start using it.&lt;/p&gt;

&lt;p&gt;Python offers another standard library called &lt;code&gt;email&lt;/code&gt; for basic email-related operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending a simple email
&lt;/h2&gt;

&lt;p&gt;So first of all let's import &lt;code&gt;smptplib&lt;/code&gt; which has already done all the heavy lifting for us.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;smtplib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SMTP&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to define some important variables to get started.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'smtp.gmail.com'&lt;/span&gt; 
&lt;span class="c1"&gt;# use the smtp server address of your mail provider
&lt;/span&gt;

&lt;span class="n"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;587&lt;/span&gt; 
&lt;span class="c1"&gt;# this if for TLS, 
# will discuss more about this in a future article
&lt;/span&gt;
&lt;span class="n"&gt;SENDER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'youremail@gmail.com'&lt;/span&gt;

&lt;span class="n"&gt;PASSWORD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'your12434(893**!@password'&lt;/span&gt; 
&lt;span class="c1"&gt;# don't share this script with anyone 🤫
# for building real applications
# always read secrets from environment variables
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have defined the variables required, let's move on to start a connection with the mail server and log in with our credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SMTP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# create an SMTP server object
&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# connect 
&lt;/span&gt;

&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ehlo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;# extended hello; like saying hello
&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;starttls&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ehlo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PASSWORD&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# login with your credentials
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All the shitty stuff is now over, it's time to finally send the email.&lt;/p&gt;

&lt;p&gt;Before we do that, we need to have the email address of the recipient and also the message we want to send them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;RECIPIENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'email@example.com'&lt;/span&gt;

&lt;span class="n"&gt;MESSAGE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'''
Hi! How are you?

This is my first email sent from Python.

Hope to see you soon.
'''&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, one more line to send the email to the destination.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sendmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SENDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;RECIPIENT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;MESSAGE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it, we are done. 😀&lt;/p&gt;

&lt;p&gt;Reading the tutorial passively will do you no good. Write down the script in a file called &lt;code&gt;send.py&lt;/code&gt; and run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;❯ python send.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything went right, then there will be no output in the terminal, and you will see the email sitting right in the recipient's inbox.&lt;/p&gt;

&lt;p&gt;In the upcoming articles of this series, we will make some enhancements to the script, so that we can send rich text emails and also attach files with our email.&lt;/p&gt;

</description>
      <category>python</category>
      <category>email</category>
      <category>tutorial</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Stack Overflow blocked me from asking questions 😥</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Tue, 06 Apr 2021 16:52:06 +0000</pubDate>
      <link>https://dev.to/aahnik/stack-overflow-blocked-me-from-asking-questions-402i</link>
      <guid>https://dev.to/aahnik/stack-overflow-blocked-me-from-asking-questions-402i</guid>
      <description>&lt;p&gt;I don't know why. But for quite a long time I am getting this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lWMx4daU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f53l40ymydtucsnz5v3q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lWMx4daU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f53l40ymydtucsnz5v3q.gif" alt="so_qb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stack Overflow says: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You have reached your question limit&lt;br&gt;
Sorry, we are no longer accepting questions from this account. See the Help Center to learn more.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My Stack Overflow profile link is &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://stackoverflow.com/users/13523305/aahnik"&gt;https://stackoverflow.com/users/13523305/aahnik&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Can you help me debug this issue? I have not violated any community guidelines, as far as I know.&lt;/p&gt;

&lt;p&gt;Some of my questions received a few downvotes, but I deleted those.&lt;/p&gt;

&lt;p&gt;What can I do to regain the capability to ask questions in Stack Overflow?&lt;/p&gt;

&lt;p&gt;Has this ever happened to you? Please let me know in the comments.&lt;/p&gt;

&lt;p&gt;What suggestions do you have for me to gain back access to ask questions in SO?&lt;/p&gt;

&lt;p&gt;What should I do now? 😥😥&lt;/p&gt;

</description>
      <category>help</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Has using Linux changed your life?</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Tue, 06 Apr 2021 14:08:08 +0000</pubDate>
      <link>https://dev.to/aahnik/has-using-linux-changed-your-life-1ola</link>
      <guid>https://dev.to/aahnik/has-using-linux-changed-your-life-1ola</guid>
      <description>&lt;p&gt;I am curious to listen to other people whose lives have been changed by Linux.&lt;/p&gt;

&lt;p&gt;I personally got into programming, and got the fun of the dev world, after I switched to Linux from windows, about 1 year back.&lt;/p&gt;

&lt;p&gt;What is your story with Linux? I am curious to know. &lt;/p&gt;

&lt;p&gt;Please comment. (but possibly keep it brief)&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>linux</category>
    </item>
    <item>
      <title>Build unlimited free-forever static sites without a single line of code</title>
      <dc:creator>Aahnik Daw</dc:creator>
      <pubDate>Mon, 05 Apr 2021 05:02:58 +0000</pubDate>
      <link>https://dev.to/aahnik/build-unlimited-free-forever-static-sites-without-a-single-line-of-code-5ep4</link>
      <guid>https://dev.to/aahnik/build-unlimited-free-forever-static-sites-without-a-single-line-of-code-5ep4</guid>
      <description>&lt;p&gt;In this digital era, it is very crucial to be able to publish pages online.&lt;/p&gt;

&lt;p&gt;We all have different needs. Someone may need to publish their portfolio, while an educational institute may need to publish their curriculum. The uses are endless.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu7l4fhdc9sf9cei8p4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu7l4fhdc9sf9cei8p4e.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a requirement for a fast and free system, that will allow us to publish pages online.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://notion.so" rel="noopener noreferrer"&gt;Notion&lt;/a&gt; is a fantastic all-in-one tool to accomplish a variety of tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heaven 😍
&lt;/h2&gt;

&lt;p&gt;There is one thing that Notion shines in. That is, the &lt;strong&gt;creation of beautiful pages&lt;/strong&gt;. With Notion's &lt;em&gt;drag and drop&lt;/em&gt; editor, you can create &lt;strong&gt;simple yet stunning&lt;/strong&gt; pages.&lt;/p&gt;

&lt;p&gt;You can have all sorts of formatting like bold, italics, and so on. You have multiple heading levels. You can even change the text color or background color.&lt;/p&gt;

&lt;p&gt;You can drag and drop the blocks to organize the page in multiple columns, or even create sub-pages or toggle blocks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl6pc3a79eq5kx9rftub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl6pc3a79eq5kx9rftub.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can directly &lt;strong&gt;embed code or a tweet or a youtube video&lt;/strong&gt; in a Notion page.&lt;/p&gt;

&lt;p&gt;For a full list of blocks, that notion offers, please visit &lt;a href="https://notion.so" rel="noopener noreferrer"&gt;notion.so&lt;/a&gt; and try it out yourself, if you have not yet used Notion.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I believe that this is a far superior way of creating content than using Word Docx or google sheets or plain markdown files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using the publish to web feature, you can make any Notion page public.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Y-MFFm5Vi0o"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 😥
&lt;/h2&gt;

&lt;p&gt;But Notion does not yet allow &lt;strong&gt;custom domains&lt;/strong&gt; and &lt;strong&gt;custom slugs&lt;/strong&gt; (as on the date this article is published). Plus another big disadvantage is Notion's &lt;strong&gt;slow loading time&lt;/strong&gt;. There is several excess stuff on the page, that makes your viewers wait for the page to load.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution 🤩
&lt;/h2&gt;

&lt;p&gt;How to solve this problem?&lt;/p&gt;

&lt;p&gt;As of now, the best free way is using &lt;a href="https://github.com/leoncvlt/loconotion" rel="noopener noreferrer"&gt;loconotion&lt;/a&gt; which an open-source python tool written by  &lt;a href="https://github.com/leoncvlt" rel="noopener noreferrer"&gt;Leonardo Cavaletti&lt;/a&gt;.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/leoncvlt" rel="noopener noreferrer"&gt;
        leoncvlt
      &lt;/a&gt; / &lt;a href="https://github.com/leoncvlt/loconotion" rel="noopener noreferrer"&gt;
        loconotion
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      📄 Python tool to turn Notion.so pages into lightweight, customizable static websites
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Loconotion parses the notion pages to produce static HTML, CSS, and js files, which you can deploy anywhere like &lt;a href="https://pages.github.com/" rel="noopener noreferrer"&gt;GitHub pages&lt;/a&gt; or &lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can have custom slugs (just change the name of the HTML files to the slug you want).&lt;/li&gt;
&lt;li&gt;Loconotion removes unnecessary javascript and CSS to output lightweight pages that load fast.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Enhancement 😎
&lt;/h2&gt;

&lt;p&gt;As of now (April 05, 2021) loconotion outputs all the files in a single directory, which looks very clumsy.&lt;/p&gt;

&lt;p&gt;I made a &lt;a href="https://gist.github.com/aahnik/2c18af0ee937bb2947873774f069adc4" rel="noopener noreferrer"&gt;script&lt;/a&gt; that can organize all the files generated by loconotion into various subdirectories without breaking any HTML or CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy 😘
&lt;/h2&gt;

&lt;p&gt;You can upload all these files to a GitHub repository, and enable GitHub pages for the repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp90ob4wjj2rvfcygx4yg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp90ob4wjj2rvfcygx4yg.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub pages also allow you to publish the site to a custom domain you own. Read how to set up that in the &lt;a href="https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;And thus you have a static site, up and running in a few minutes.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;If you make any changes, just push the updated files to the GitHub repo, and they go live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you have built any site or pages using this technique, please post a link to that in the comments below.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How do you build fast static sites for publishing some content to the web? Please share your ideas and techniques in the comments below.&lt;/p&gt;

&lt;p&gt;I am &lt;a href="https://github.com/aahnik" rel="noopener noreferrer"&gt;@aahnik&lt;/a&gt; on GitHub. Do check out my projects if you are scrolling. ❤️&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>github</category>
      <category>showdev</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
