<?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: alikhan1998</title>
    <description>The latest articles on DEV Community by alikhan1998 (@alikhan1998).</description>
    <link>https://dev.to/alikhan1998</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%2F1159712%2Fe7e4d468-c8cd-449a-8acf-ab73b89361a8.png</url>
      <title>DEV Community: alikhan1998</title>
      <link>https://dev.to/alikhan1998</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alikhan1998"/>
    <language>en</language>
    <item>
      <title>Refactoring Drowsiness Detection System</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Wed, 01 Nov 2023 11:48:58 +0000</pubDate>
      <link>https://dev.to/alikhan1998/refactoring-drowsiness-detection-system-479d</link>
      <guid>https://dev.to/alikhan1998/refactoring-drowsiness-detection-system-479d</guid>
      <description>&lt;p&gt;Issue Link: hassaanahmed04/Drowsiness-Detection-System #1&lt;br&gt;
Issue Details: The current code implements a Drowsiness Monitoring System, combining image processing techniques with GUI elements using Tkinter. While the functionality is in place, there are opportunities for improvement in terms of code organization and readability.&lt;/p&gt;

&lt;p&gt;Proposed Changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Modularize the code: Broke down the code into smaller, well-defined functions or classes to improve code structure and readability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add comments: Document complex logic or provide context for certain operations to enhance code understanding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use meaningful variable and function names: Ensured that variable and function names are descriptive and follow a consistent naming convention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement error handling: Added appropriate error handling to handle scenarios where files or resources may not be found.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use os.path.join(): Utilized this function to construct file paths, ensuring compatibility across different operating systems.&lt;br&gt;
Expected Outcome: The refactored code should maintain the functionality of the Drowsiness Monitoring System while significantly improving its readability, maintainability, and adherence to coding best practices.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Research and Challenges: Understanding the existing codebase and identifying areas for improvement required careful examination. Ensuring compatibility across different operating systems was a key challenge. Interactions with Maintainers: No direct interactions with maintainers for this issue. Difficulties Faced and Solutions: Refactoring a complex system like the Drowsiness Monitoring System required a systematic approach. Breaking down the code into smaller functions and adding comments greatly enhanced code comprehension&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Adding Calculation History Feature</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Wed, 01 Nov 2023 11:46:57 +0000</pubDate>
      <link>https://dev.to/alikhan1998/adding-calculation-history-feature-187d</link>
      <guid>https://dev.to/alikhan1998/adding-calculation-history-feature-187d</guid>
      <description>&lt;p&gt;Issue Link: alikhan1998/BABLU-The-Smart-Calculator-Assistant #1&lt;br&gt;
Issue Details: Implement a feature that keeps track of the user's calculation history. This feature will allow users to view their previous calculations and results, providing them with a convenient way to reference their work.&lt;/p&gt;

&lt;p&gt;Changes Made:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Created a data structure (dictionary) to store the history of calculations.&lt;/li&gt;
&lt;li&gt;Whenever a calculation is performed, stored the input expression and its result in the data structure.&lt;/li&gt;
&lt;li&gt;Provided a command for users to view their calculation history.
Research and Challenges: Researched data structures suitable for storing calculation history. The main challenge was ensuring efficient retrieval and display of history. Interactions with Maintainers: No direct interactions with maintainers for this issue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Difficulties Faced and Solutions: Designing the data structure for history storage required careful consideration. Ultimately, a dictionary proved to be an effective choice for this feature.&lt;br&gt;
Pull Request: Link to Pull Request&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Multilingual Support in image_to_sound</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Wed, 01 Nov 2023 11:45:05 +0000</pubDate>
      <link>https://dev.to/alikhan1998/multilingual-support-in-imagetosound-5bma</link>
      <guid>https://dev.to/alikhan1998/multilingual-support-in-imagetosound-5bma</guid>
      <description>&lt;p&gt;Issue Details: Currently, the code converts text to speech in English ("en"). It would be beneficial to extend this functionality to support multiple languages. Users should be able to specify the &lt;br&gt;
target language for the generated audio.&lt;/p&gt;

&lt;p&gt;Changes Made:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Allowed users to input the target language code or name as an argument when calling the image_to_sound function.&lt;/li&gt;
&lt;li&gt;Implemented logic to select the appropriate language for the gTTS module based on the user's input. Research and Challenges: Researched the gTTS documentation and language codes. The main 
challenge was ensuring compatibility with different language inputs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Interactions with Maintainers: No direct interactions with maintainers for this issue. Difficulties Faced and Solutions: Understanding the gTTS API and integrating multilingual &lt;br&gt;
support required careful reading of the documentation. Regular testing helped verify the implementation. &lt;br&gt;
Pull Request: Link to Pull Request&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Refactoring OncoNet Script</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Wed, 01 Nov 2023 11:42:47 +0000</pubDate>
      <link>https://dev.to/alikhan1998/refactoring-onconet-script-2fho</link>
      <guid>https://dev.to/alikhan1998/refactoring-onconet-script-2fho</guid>
      <description>&lt;p&gt;Issue Link: yala/Mirai #9&lt;br&gt;
Issue Details: The provided script is a part of the OncoNet project and is used for training, evaluating, and predicting on a dataset. While the script appears to be functional, there are opportunities for improvement in terms of code organization and documentation.&lt;/p&gt;

&lt;p&gt;Changes Made:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Modularized the code: Broke down the script into smaller, well-defined functions and classes to improve code structure and maintainability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Added Comments and Documentation: Documented complex logic and provided context for certain operations to enhance code understanding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved Variable Naming: Ensured that variable and function names are descriptive and follow a consistent naming convention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implemented Error Handling: Added appropriate error handling to handle scenarios where files or resources may not be found.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Utilized os.path.join(): Used this function to construct file paths, ensuring compatibility across different operating systems.&lt;br&gt;
Research and Challenges: Researched best practices for code organization and documentation. The main challenge was understanding the existing code and identifying opportunities for improvement.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Interactions with Maintainers: No direct interactions with maintainers for this issue. Difficulties Faced and Solutions: Understanding the complex logic in the script was challenging. &lt;br&gt;
However, breaking it down into smaller functions and adding comments greatly helped in comprehending the code. Pull Request: Link to Pull Reques&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Latest addition to the TIL (Today I Learned) Tool</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Mon, 30 Oct 2023 11:47:06 +0000</pubDate>
      <link>https://dev.to/alikhan1998/latest-addition-to-the-til-today-i-learned-tool-28f9</link>
      <guid>https://dev.to/alikhan1998/latest-addition-to-the-til-today-i-learned-tool-28f9</guid>
      <description>&lt;p&gt;Greetings, fellow developers! Today, I am thrilled to announce the latest addition to the TIL (Today I Learned) Tool.&lt;/p&gt;

&lt;p&gt;As part of our continuous enhancement efforts, we've incorporated a new metadata feature that significantly augments the generation of &lt;br&gt;
HTML files from Markdown content. This blog post delves into the inception, development, and the functionality brought about by this new feature.&lt;/p&gt;

&lt;p&gt;Description of the Feature: The metadata feature is designed to augment the contextual information available within the generated HTML files. Users can now include additional metadata while converting Markdown files to HTML through the TIL Tool. &lt;br&gt;
This metadata provides crucial additional information about the content being converted. It enables users to embed information such as author details, creation dates, categories, and much more directly into the HTML output.&lt;/p&gt;

&lt;p&gt;How It Works and the Problems It Solves: The implementation introduces command line arguments (-m or --metadata flags) to accept user input for metadata. This capability allows users to provide relevant contextual details while processing Markdown &lt;br&gt;
content, thereby enhancing the overall utility of the tool. With this feature, users can enrich the output HTML files with important details related to the content, making them more informative and useful.&lt;/p&gt;

&lt;p&gt;Development Insights: The feature was implemented by extending the existing script to accommodate additional command-line arguments and processing logic. It was inspired by the need for more contextual information within the HTML output and driven by the goal of making the tool more user-centric and feature-rich. Similar to Docusaurus, our aim was to provide an intuitive and extensible solution, all while maintaining simplicity and usability.&lt;/p&gt;

&lt;p&gt;Differences from Docusaurus: While Docusaurus served as an inspiration, the metadata feature implementation in the TIL Tool is geared specifically towards enhancing the content and contextual information within generated HTML files, making it a tool that's focused on the transformation of Markdown content to HTML with &lt;br&gt;
augmented contextual information.&lt;/p&gt;

&lt;p&gt;Next Steps and Community Involvement: For the future, our next steps involve addressing any feedback, improving the metadata feature, and enhancing its capabilities based on user interactions. We've filed issues within our repository related to this feature to keep track of enhancements, and we welcome contributions from the &lt;br&gt;
community.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Adding a TOML Config File Feature in Collaborative Development with Remotes</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Fri, 06 Oct 2023 16:21:18 +0000</pubDate>
      <link>https://dev.to/alikhan1998/adding-a-toml-config-file-feature-in-collaborative-development-with-remotes-5hcg</link>
      <guid>https://dev.to/alikhan1998/adding-a-toml-config-file-feature-in-collaborative-development-with-remotes-5hcg</guid>
      <description>&lt;p&gt;It's wonderful to work on new features for projects, but cooperating with others, especially when you have to access their repository, makes it even more intriguing. I'd like to share with you my experience adding TOML configuration file functionality to a fellow student's GitHub repository recently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problems and Challenges of Code Implementation&lt;/strong&gt;:&lt;br&gt;
Understanding the current codebase and figuring out how to effortlessly incorporate the new feature were the initial challenges. Fortunately, the owner of the repository had specified clear instructions and prerequisites in the GitHub issue, making the first setup pretty simple.&lt;/p&gt;

&lt;p&gt;The TOML configuration file's parsing presented a significant issue. To get around this, I used an up-to-date TOML parsing package rather than creating a parser from scratch. This choice ensured the dependability of the code while also saving time.&lt;/p&gt;

&lt;p&gt;Handling circumstances when the configuration file was either missing or unable to be correctly processed presented another issue. To fix this, I added error handling that, when required, gently ended the program and presented clear error messages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Working together with Git Remotes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Utilizing Git Remotes&lt;/strong&gt;:&lt;br&gt;
When you need to coordinate your modifications with those of another person, working on their repository adds an additional level of complication. This is how I handled the situation:&lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt;Forking and Cloning: Initially, I forked the repository to my GitHub account before cloning it to my local computer. As a result, I had my own copy of the project to work on.&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt;Branching: Using branches, I made a new branch for my work, making sure the name was appropriate and reflected the task I was working on. Clarity was maintained by using naming conventions like "issue-6" or "config-file".&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt;Regular Pushes: I frequently pushed my branch to my fork in order to keep my work current on GitHub and to keep a copy of my improvements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt;Draft Pull Request: Early on in the process, I made a Draught Pull Request. Draught PRs are wonderful for work in progress since they let me keep adding fresh commits while also asking the repository owner for comments.&lt;br&gt;
&lt;strong&gt;5.&lt;/strong&gt;Communication: It was essential to have good communication with the repository owner. I updated the GitHub issue, asked questions, and talked about any problems or ambiguities that came up during development.&lt;br&gt;
Git Problems and Learning Challenges encountered and solutions:&lt;br&gt;
Although the procedure was largely straightforward, using Git remotes did provide some difficulties:&lt;/p&gt;

&lt;p&gt;•&lt;strong&gt;Managing Merge Conflicts&lt;/strong&gt;: When people work together on a project, merge conflicts can arise. When you and the repository owner make modifications to the same files, these conflicts may occur. Clear communication and coordination with the owner are crucial to resolving this. Collaboration was used to resolve disagreements and guarantee that both sets of improvements were easily incorporated into the final codebase.&lt;/p&gt;

&lt;p&gt;•&lt;strong&gt;Tracking Branches Updating&lt;/strong&gt;: I had to use git pull name-of-student&amp;gt; branch-name&amp;gt; to keep my local tracking branch current with the modifications the repository owner made. This made sure that my branch had the most recent updates.&lt;/p&gt;

&lt;p&gt;What I Would Change Looking back, I would place even greater emphasis on proactive contact with the repository owner. Teamwork is at the heart of collaboration, and regular updates and debates can promote more orderly growth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main Points&lt;/strong&gt;&lt;br&gt;
In a team setting, developing a new feature taught me numerous important lessons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt;Effective Communication: When working with others, especially when making modifications to their codebase, it's critical to communicate clearly and promptly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt;Git Mastery: Working with Git remotes may initially appear difficult, but with practice it becomes more manageable. Don't be afraid to ask for assistance if you run across problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt;Planning and Problem-Solving: The development process can be made simpler by thoughtful planning, comprehension of the existing codebase, and the selection of the appropriate libraries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt;Teamwork: Collaboration is about working together, and it's a fulfilling experience when you can add your expertise to a project to make it better.&lt;br&gt;
Conclusion&lt;br&gt;
In conclusion, it was difficult and satisfying to add a TOML configuration file functionality through collaborative development to a repository. It not only taught me technical skills but also the value of cooperation and clear communication. I'll apply these principles I've learned as a developer as I continue to advance, promoting teamwork and developing my problem-solving abilities as I go.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a "Today I Learned" (TIL) Tool in Python</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Sun, 17 Sep 2023 17:55:08 +0000</pubDate>
      <link>https://dev.to/alikhan1998/building-a-today-i-learned-til-tool-in-python-3a8j</link>
      <guid>https://dev.to/alikhan1998/building-a-today-i-learned-til-tool-in-python-3a8j</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the realm of programming and open source development, the concept of "Today I Learned" or TIL posts has gained significant popularity. These posts serve as a means to share bite-sized nuggets of knowledge and insights discovered during various technical endeavors. Beyond its utility in disseminating knowledge to others, TIL posts also serve as personal repositories of learning for future reference.&lt;/p&gt;

&lt;p&gt;This article embarks on the journey of constructing a straightforward command-line TIL tool in Python. The tool's primary function is to transform Markdown files into HTML format, facilitating the sharing of newfound wisdom on the web.&lt;/p&gt;

&lt;p&gt;Prerequisites&lt;/p&gt;

&lt;p&gt;Before we dive into the technicalities, let's ensure we have the prerequisites in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A working installation of Python.&lt;/li&gt;
&lt;li&gt;A fundamental grasp of Python programming.&lt;/li&gt;
&lt;li&gt;Familiarity with Markdown, a lightweight markup language.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Language Selection
&lt;/h2&gt;

&lt;p&gt;Our first task involves choosing an appropriate programming language for our TIL tool. We've opted for Python, primarily due to its simplicity and the availability of libraries catering to Markdown and HTML processing. However, you're welcome to use a language of your preference if you're more comfortable with it.&lt;/p&gt;

&lt;p&gt;Step 2: Project Initialization&lt;/p&gt;

&lt;p&gt;To kickstart our project, we initiate a GitHub repository to facilitate version control and collaboration with fellow developers. If you're new to GitHub, don't worry; you can refer to &lt;a href="https://docs.github.com/en/github/getting-started-with-github/create-a-repo"&gt;GitHub's comprehensive guide&lt;/a&gt; on creating a new repository.&lt;/p&gt;

&lt;p&gt;Upon establishing the repository, it's essential to include a license file (e.g., MIT) and craft a detailed &lt;code&gt;README.md&lt;/code&gt; to comprehensively document the project's purpose and usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Implementing Core Functionality
&lt;/h2&gt;

&lt;p&gt;The heart of our TIL tool revolves around executing the following key functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parsing command-line arguments to specify input files and output folders.&lt;/li&gt;
&lt;li&gt;Reading the content of input Markdown files.&lt;/li&gt;
&lt;li&gt;Transforming Markdown to HTML using the &lt;code&gt;markdown&lt;/code&gt; library.&lt;/li&gt;
&lt;li&gt;Writing the HTML content to corresponding output HTML files.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our Python script encapsulates these functionalities. Here's a simplified version:&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;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;argparse&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;markdown&lt;/span&gt;

&lt;span class="c1"&gt;# Function to convert Markdown to HTML
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;convert_to_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;markdown_text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Convert Markdown to HTML
&lt;/span&gt;    &lt;span class="n"&gt;html_content&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="n"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;markdown_text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;html_content&lt;/span&gt;

&lt;span class="c1"&gt;# Function to process a single input file
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_folder&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Read the content of the input file
&lt;/span&gt;    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'r'&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;markdown_text&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="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;# Convert Markdown to HTML
&lt;/span&gt;    &lt;span class="n"&gt;html_content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;convert_to_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;markdown_text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Create the output file path
&lt;/span&gt;    &lt;span class="n"&gt;input_filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;basename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;output_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output_folder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input_filename&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'.txt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'.html'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="c1"&gt;# Write the HTML content to the output file
&lt;/span&gt;    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'w'&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="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;html_content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Main function
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Parse command-line arguments
&lt;/span&gt;    &lt;span class="n"&gt;parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;argparse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ArgumentParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'TIL Tool - Convert Markdown to HTML'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'input'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'Input .txt file or folder of .txt files'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'-o'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'--output'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'til'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'Output directory for HTML files'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse_args&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;# Create the output folder if it doesn't exist
&lt;/span&gt;    &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;makedirs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;exist_ok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Process the input (file or folder)
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;process_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Process all .txt files in the input folder
&lt;/span&gt;        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'.txt'&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="n"&gt;input_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;process_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;'__main__'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Incorporating Optional Features
&lt;/h2&gt;

&lt;p&gt;While our TIL tool covers the essentials, it can be further enriched with optional features. These include the ability to specify a custom stylesheet, handling titles, and enhancing the visual appeal of generated HTML pages. Depending on your preferences and project goals, you can choose from these optional features provided in the assignment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Testing the TIL Tool
&lt;/h2&gt;

&lt;p&gt;Before sharing your TIL tool with others, rigorous testing is imperative. Create sample TIL posts in Markdown format, and employ your tool to convert them to HTML. It's vital to verify that the generated HTML aligns with your expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Documentation and README
&lt;/h2&gt;

&lt;p&gt;A meticulously documented project is indispensable for open source development. Elevate your project's &lt;code&gt;README.md&lt;/code&gt; to offer precise instructions on how to harness your TIL tool. Include comprehensive details regarding available features, command-line arguments, and illustrative examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Publishing Your TIL Posts
&lt;/h2&gt;

&lt;p&gt;Once your TIL tool is fully operational, commence composing TIL posts. Establish a dedicated folder for your TIL posts, pen them in Markdown, and utilize your tool for the transformation into HTML. Subsequently, you can broadcast these HTML files on a website, blog, or platform of your choosing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building a Python-based TIL tool is an excellent conduit for disseminating knowledge and discoveries within the community. This project imparts valuable insights into open source development conventions, command-line utilities, and Markdown-to-HTML conversion. Personalize and enhance your tool to augment its utility for your TIL posts.&lt;/p&gt;

&lt;p&gt;Happy TIL-ing!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unlocking EverShop: A Journey into Open Source E-Commerce</title>
      <dc:creator>alikhan1998</dc:creator>
      <pubDate>Tue, 12 Sep 2023 22:52:14 +0000</pubDate>
      <link>https://dev.to/alikhan1998/unlocking-evershop-a-journey-into-open-source-e-commerce-2li</link>
      <guid>https://dev.to/alikhan1998/unlocking-evershop-a-journey-into-open-source-e-commerce-2li</guid>
      <description>&lt;p&gt;Greetings, folks!&lt;/p&gt;

&lt;p&gt;I go by the name Sher Ali Khan, but you can call me Ali – it's simpler, snappier, and easier to remember. Now, you might be wondering why I've embarked on the OSD600NSA course at Seneca – well, that's a question only the curious minds among you might ask.&lt;/p&gt;

&lt;p&gt;Open source, my friends, has always tickled my intellectual taste buds. It's like a global potluck of innovation, where brilliant minds from around the planet converge to cook up a storm of collaborative code for the greater good. Think of it as the coolest party in the tech world – transparent, exclusive (in a good way), and filled with a spirit of innovation that's positively contagious.&lt;/p&gt;

&lt;p&gt;Contributing to an open-source gem like EverShop is like embarking on a transformational odyssey of learning. It's not just about sharpening your technical toolkit; it's about crafting your soft skills, embracing the open source ethos, and uncovering a world of development and collaboration you never knew existed. The journey is more profound than lines of code; it's about shaping your career and personal growth.&lt;/p&gt;

&lt;p&gt;EverShop, my dear reader, isn't your run-of-the-mill e-commerce platform; it's a bustling community-driven marketplace where e-commerce dreams come to life. With transparency as its guiding star, a welcoming community, and an unwavering commitment to improvement, EverShop is like the friend who's always got your back in the world of open source e-commerce.&lt;/p&gt;

&lt;p&gt;So, why would someone like me choose EverShop? Well, it's like a box of goodies from the open source treasure chest: the thrill of openness, the joy of customization, the comfort of a supportive community, the savings of cost-effectiveness, the adaptability of versatility, and the security of a watchful guardian. Whether you're a business maven seeking the perfect e-commerce solution or a coding whiz searching for an open source project to infuse with your brilliance, EverShop beckons as a compelling choice in the bustling e-commerce landscape.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="https://github.com/alikhan1998/evershop"&gt;https://github.com/alikhan1998/evershop&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
