Day 127: Creating a transfer program part 1

Dan Esmail - 5/7/2023

Intro

Okay so doing the blog transfer super manually really sucked and I couldn’t keep doing it. So what do you do when you are lazy? Build something that can do it for you. I’ve started to work on a program that I can just copy and paste in the old blog and it will spit out the new format.

First things first I need a web page to be able to copy everything into to make my life easier.


HTML
Blog Transfer HTML

                
                    
<!DOCTYPE html>
<html lang='en' dir='ltr'>
  <head>
    <meta charset='utf-8'>
    <title></title>
  </head>
  <body>
    <textarea id='text-box' name='name' rows='8' cols='80' ></textarea>
    <button id='change-button' type='button' name='button' >Change ME</button>
    <div class='transformed-blog'>
      
    </div>

    <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js'></script>
    <script type='text/javascript' src='../JS/transfer.js'></script>
  </body>
</html>

                
            

This was a really simple webpage with no CSS. I just wanted to make sure that I had a text box that would take in the code and transfer it. Then I added one button that would send this information to the console.

Splitting up

The main thing I had to figure out after building the webpage is how am I going to split this up to make sense? I had to remember all the parts that were within the blog. First off I have the head which is going to have to have the title, description, and Keywords for SEO. Next, I have a main section that needs the publisher and Title. Finally, I have the blog section that are going to have section headers, Blog paragraphs, code boxes, and finally links. With everything I have about 9 different things that I’m going to have to look at and reformat.

Now that I have an idea of what I need to break up I can start to build out functions to reformat everything


Day 1

Day 1