DEV Community

Roman Rezinkin
Roman Rezinkin

Posted on

DPS909 - Lab 3 Blog

Lab 3

For this week in Open Source Learning, we had to implement two new features, and also learn to use git merge. The functionalities that I chose to implement into my Static Site Generator could be found here:

  1. Issue 1
  2. Issue 2

The details could be found by clicking into the issues, but to summarize, I chose to add the ability for the horizontal line within html. With the user specifying the markdown syntax of ("---"), I was able to implement a


tag that would generate the horizontal line.

The second issue addressed the ability for a new command line argument. The user could now have the ability to specify the root html tag language. By using

python romanssg.py --lang="some language code"

or

python romanssg.py -l="some language code"

, the generated html will take the language code and add it into the root html tag. If the user does not specify the command, the default of "en-CA" is used.

I also took the opportunity in Issue 2 to fix my issue of having global variables.

Instead of creating Pull Requests, we had to use the git merge function. Once I confirmed that my code works, I used

git checkout main

, followed by

git merge issue19

. This merged issue19 into my main branch. I then gave a quick once over to make sure that the changes were merged into main using my IDE. Following this, I then did

git merge issue21

which merged my issue21 into my main branch. I once again double checked that everything worked, and finally was able to run

git push origin main

Overall, I learned a new method of merging my code changes between branches, which saves the need for Pull Requests, since I am doing local changes to my own code.

Top comments (0)