<?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: wollens</title>
    <description>The latest articles on DEV Community by wollens (@wollens).</description>
    <link>https://dev.to/wollens</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%2F907078%2Fac3be749-cb7c-4318-9358-46fe5fad889e.png</url>
      <title>DEV Community: wollens</title>
      <link>https://dev.to/wollens</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wollens"/>
    <language>en</language>
    <item>
      <title>Use python to build markdown Converter</title>
      <dc:creator>wollens</dc:creator>
      <pubDate>Fri, 22 Nov 2024 05:41:40 +0000</pubDate>
      <link>https://dev.to/wollens/use-python-to-build-markdown-converter-2116</link>
      <guid>https://dev.to/wollens/use-python-to-build-markdown-converter-2116</guid>
      <description>&lt;p&gt;🚀 Check out my URL/PDF/DOCX to Markdown Converter!&lt;/p&gt;

&lt;p&gt;Hey fellow developers! 👋&lt;/p&gt;

&lt;p&gt;I'm super excited to share a tool I've been working on that I think might make your life a bit easier. You know that annoying process of converting documents to Markdown? Well, I built something to handle that! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it do?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Converts web pages to Markdown with just a URL&lt;/li&gt;
&lt;li&gt;Transforms PDF files to Markdown (using pdfplumber)&lt;/li&gt;
&lt;li&gt;Converts DOCX files to clean Markdown&lt;/li&gt;
&lt;li&gt;Lets you preview the rendered result right there&lt;/li&gt;
&lt;li&gt;Comes with copy/download buttons for quick access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built it using FastAPI for the backend (it's crazy fast! ⚡) and kept the frontend super clean and simple. You literally just paste a URL or upload a file, hit convert, and boom! 💥 You've got your Markdown.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I made this:&lt;/strong&gt;&lt;br&gt;
I got tired of manually converting docs for my documentation work, and thought others might find this useful too. Plus, I wanted to learn more about FastAPI and document processing in Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FastAPI (because who doesn't love async Python? 🐍)&lt;/li&gt;
&lt;li&gt;pdfplumber for PDF parsing&lt;/li&gt;
&lt;li&gt;python-docx for Word docs&lt;/li&gt;
&lt;li&gt;marked.js for the preview&lt;/li&gt;
&lt;li&gt;Basic HTML/CSS/JS for the frontend&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code is open source, and I'd love to get your feedback or contributions! Check out the screenshots in the README to see it in action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it out:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repo&lt;/li&gt;
&lt;li&gt;Install dependencies&lt;/li&gt;
&lt;li&gt;Run with uvicorn&lt;/li&gt;
&lt;li&gt;Convert all the things! 🎉&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What do you think? Would love to hear your thoughts or suggestions for improvements! And if anyone wants to contribute, PRs are more than welcome! 🤝&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/DanielZhui/py-2-md" rel="noopener noreferrer"&gt;py-2-md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for all the feedback! I'm already working on some of your suggestions! 🙏&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Golang build a file DB</title>
      <dc:creator>wollens</dc:creator>
      <pubDate>Thu, 31 Oct 2024 04:37:37 +0000</pubDate>
      <link>https://dev.to/wollens/golang-build-a-file-db-2m7l</link>
      <guid>https://dev.to/wollens/golang-build-a-file-db-2m7l</guid>
      <description>&lt;p&gt;Hey there, Gophers and DB enthusiasts!&lt;/p&gt;

&lt;p&gt;So, I've been diving into Go lately (loving it, by the way!), and I thought, "Why not build something cool to really get my hands dirty?" That's when I stumbled upon go-caskdb, and it sparked an idea. I decided to create my own little file-based database, which I'm calling FileDB. It's been quite the journey, and I wanted to share it with you all!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/DanielZhui/fileDB" rel="noopener noreferrer"&gt;FileDB &lt;/a&gt; is pretty straightforward - it's a key-value store that persists data to disk. Here's what it can do:&lt;/p&gt;

&lt;p&gt;Set key-value pairs&lt;/p&gt;

&lt;p&gt;Retrieve values by key&lt;/p&gt;

&lt;p&gt;Update existing entries&lt;/p&gt;

&lt;p&gt;Delete keys (well, kind of - more on that in a sec)&lt;/p&gt;

&lt;p&gt;The cool part? It's all stored in a single file! Each entry is encoded with a timestamp, making it easy to track when data was last modified.&lt;/p&gt;

&lt;p&gt;Now, I'll be honest - it's not perfect. The delete operation doesn't actually remove data from the file (it just removes the key from memory). And updating a value? It just appends a new entry to the end of the file. So yeah, file size management is definitely something I need to work on!&lt;/p&gt;

&lt;p&gt;But man, did I learn a ton building this:&lt;/p&gt;

&lt;p&gt;File I/O in Go is pretty sweet. Those &lt;code&gt;os&lt;/code&gt; and &lt;code&gt;io&lt;/code&gt; packages are powerful!&lt;/p&gt;

&lt;p&gt;Encoding and decoding binary data was a fun challenge.&lt;/p&gt;

&lt;p&gt;I got to play around with error handling in Go - still getting used to that &lt;code&gt;if err != nil&lt;/code&gt; dance!&lt;/p&gt;

&lt;p&gt;Designing a simple API made me think hard about usability.&lt;/p&gt;

&lt;p&gt;I've got to say, Go's simplicity made this project a blast. Sure, it's not production-ready, but it's been an awesome learning experience.&lt;/p&gt;

&lt;p&gt;So, what do you think? Any Go veterans want to tear apart my code? 😅 Or maybe you've built something similar? I'd love to hear your thoughts and suggestions!&lt;/p&gt;

&lt;p&gt;Happy coding, everyone!&lt;/p&gt;

</description>
      <category>go</category>
    </item>
  </channel>
</rss>
