Skip to content

Commit 052d4f4

Browse files
dahwDean Walston
andauthored
feat: adds Dean's HTML README and markdown converter (#59)
* created my README file as a index html file with a css syle sheet page for lesson01 * feat: created my markdown to html tool file; created some changes to index and css syle sheet files in deanwalston * feat: Dean Lesson01 markdown to html tool file * feat: Dean Lesson01 markdown file to html; adds a README file * adds : changes to converter file name for clear destinction of tool --------- Co-authored-by: Dean Walston <[email protected]>
1 parent 5bd2274 commit 052d4f4

File tree

6 files changed

+380
-0
lines changed

6 files changed

+380
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import markdown
2+
import os
3+
4+
def convert_markdown_file_to_html(input_file_path, output_file_path):
5+
"""
6+
Converts a Markdown file to an HTML file.
7+
8+
Args:
9+
input_file_path (str): The path to the input Markdown file.
10+
output_file_path (str): The path to the output HTML file.
11+
"""
12+
try:
13+
with open(input_file_path, 'r', encoding='utf-8') as md_file:
14+
markdown_content = md_file.read()
15+
16+
# Convert Markdown to HTML
17+
html_content = markdown.markdown(markdown_content)
18+
19+
# Create a basic HTML structure
20+
html_output = f"""<!DOCTYPE html>
21+
<html lang="en">
22+
<head>
23+
<meta charset="UTF-8">
24+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
25+
<title>Markdown to HTML</title>
26+
<link rel="stylesheet" href="style.css">
27+
</head>
28+
<body>
29+
{html_content}
30+
</body>
31+
</html>
32+
"""
33+
34+
with open(output_file_path, 'w', encoding='utf-8') as html_file:
35+
html_file.write(html_output)
36+
37+
print(f"Successfully converted '{input_file_path}' to '{output_file_path}'")
38+
39+
except FileNotFoundError:
40+
print(f"Error: File not found at '{input_file_path}'")
41+
except Exception as e:
42+
print(f"An error occurred: {e}")
43+
44+
if __name__ == "__main__":
45+
# Define input and output file paths
46+
input_md_file = input("Enter the path to the Markdown file: ")
47+
output_html_file = os.path.splitext(input_md_file)[0] + '.html'
48+
49+
# Call the conversion function
50+
convert_markdown_file_to_html(input_md_file, output_html_file)

lesson_01/deanwalston/index.html

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="description" content="Dean A.H. Walston's personal index page showcasing his background, skills, and interests.">
7+
<link rel="stylesheet" href="/lesson_01/deanwalston/style.css">
8+
9+
<title>Dean A.H. Walston Index</title>
10+
<style>
11+
body {
12+
font-family: Arial, sans-serif;
13+
line-height: 1.6;
14+
margin: 20px;
15+
color: #333;
16+
}
17+
h1, h2, h3, h4 {
18+
color: #2c3e50;
19+
}
20+
h1 {
21+
font-size: 2.5em;
22+
}
23+
h2 {
24+
font-size: 2em;
25+
}
26+
h3 {
27+
font-size: 1.5em;
28+
}
29+
h4 {
30+
font-size: 1.2em;
31+
}
32+
ul {
33+
list-style-type: none;
34+
padding: 0;
35+
}
36+
li {
37+
margin: 5px 0;
38+
list-style-type: circle;
39+
list-style-position: inside;
40+
padding-left: 40px;
41+
42+
}
43+
img {
44+
margin: 10px 0;
45+
border-radius: 8px;
46+
}
47+
blockquote {
48+
font-style: italic;
49+
color: #7f8c8d;
50+
border-left: 4px solid #2c3e50;
51+
padding-left: 10px;
52+
margin: 20px 0;
53+
}
54+
</style>
55+
</head>
56+
<body>
57+
58+
<h1>Dean A.H. Walston README</h1>
59+
60+
<h2>🧭 Introduction</h2>
61+
<p>I'm a proud graduate of <strong>Fisk University</strong> (Nashville, TN), born and raised in <strong>Atlanta, GA</strong>. Passionate about leveraging technology to solve real-world problems, I’ve worked at:</p>
62+
<ul>
63+
<li>🏢 Rocket Mortgage / Quicken Loans</li>
64+
<li>🤝 The 100 Black Men of Atlanta, Inc.</li>
65+
<li>♻️ The Recycling Partnership</li>
66+
</ul>
67+
<p>Currently, I’m a full-time learner at <strong>Code Differently</strong>, developing both <strong>technical skills</strong> and <strong>professional soft skills</strong> to make a lasting impact in my community.</p>
68+
69+
<hr>
70+
71+
<h2>⚙️ My Development Preferences</h2>
72+
<p>Essential thing and values I need to be productive and impactful.</p>
73+
74+
<h3>🧠 Learning Style</h3>
75+
<ul>
76+
<li>🛠️ Hands-On Learning (prototyping, building, workshops)</li>
77+
<li>🤝 Social Learning (peer collaboration, mentorship, group projects)</li>
78+
</ul>
79+
80+
<h3>🧩 Skills in Progress</h3>
81+
82+
<h4>Hard Skills</h4>
83+
<ul>
84+
<li>💻 Coding</li>
85+
<li>📊 Data Analysis</li>
86+
<li>🌍 Foreign Language Proficiency (in progress)</li>
87+
</ul>
88+
89+
<h4>Soft Skills</h4>
90+
<ul>
91+
<li>🧭 Time Management</li>
92+
<li>📣 Help-Seeking & Communication</li>
93+
<li>💰 Budgeting</li>
94+
<li>📈 Career Growth (Certifications, Sustainability Practices)</li>
95+
</ul>
96+
97+
<h3>🎯 What Keeps Me Focused</h3>
98+
<ul>
99+
<li>Clear learning goals & measurable milestones</li>
100+
<li>Real-time feedback & regular check-ins</li>
101+
<li>Purpose-driven learning with community impact</li>
102+
</ul>
103+
104+
<hr>
105+
106+
<h2>🌿 Recovery-State Strategy</h2>
107+
<p><strong>A healthy mind drives a healthy workflow. Here’s how I recharge:</strong></p>
108+
109+
<h3>🔋 High-Energy / Social Recharge</h3>
110+
<ul>
111+
<li>👨‍👩‍👧‍👦 Spending time with friends and family</li>
112+
<li>✈️ Weekend travel</li>
113+
<li>🤸‍♂️ Community events (festivals, pop-ups, group fitness)</li>
114+
<li>💪 Volunteering and service work</li>
115+
</ul>
116+
117+
<h3>🔧 Moderate-Energy Recharge</h3>
118+
<ul>
119+
<li>🔥 Grilling (specializing in beef, chicken, salmon, etc.)</li>
120+
<li>🧑🏾‍🤝‍🧑🏾 Local community engagement</li>
121+
</ul>
122+
123+
<hr>
124+
125+
<h3>🧘‍♂️ Low-Energy Recharge</h3>
126+
<ul>
127+
<li>🎧 Music:
128+
<ul>
129+
<li>Genres: Hip-Hop, R&B, and genre exploration</li>
130+
<li>Current Playlist: Starts old school, ends with new age</li>
131+
<li>Artists on repeat recently: <strong>Boston Richey, Loe Shimmy, Don Toliver, PARTYNEXTDOOR</strong></li>
132+
</ul>
133+
</li>
134+
<li>📺 TV & Movies (Action-focused binge marathons)</li>
135+
<li>📚 Reading, meditation, and praying</li>
136+
<li>🏈 Watching sports</li>
137+
</ul>
138+
139+
<hr>
140+
141+
<h2>📫 Connect With Me</h2>
142+
<h3>What’s the Best Way to Communicate With Me?</h3>
143+
<ul>
144+
<li>💬 <strong>Quick Chat / Day-to-Day:</strong>
145+
Google Chat, Text Message, Zoom/Google Meet (preferred for internal communication)</li>
146+
<li>📧 <strong>Detailed or Non-Urgent Matters:</strong>
147+
Email — I typically respond within 24 hours
148+
<code>[email protected]</code></li>
149+
<li>💼 <a href="https://www.linkedin.com/in/dean-walston-663b1b14a">LinkedIn</a></li>
150+
</ul>
151+
152+
<blockquote>
153+
“Change doesn’t happen overnight — but with the right tools, the right mindset, and the right community, it’s always possible.”
154+
</blockquote>
155+
156+
<h2>Photo Gallery</h2>
157+
<h3>👨‍👩‍👧‍👦 Family & Life</h3>
158+
<img src="/lesson_00/deanwalston/images/family.jpeg" height="250" alt="Family Photo" />
159+
<img src="/lesson_00/deanwalston/images/mydog.jpeg" height="250" alt="My Dog" />
160+
<img src="/lesson_00/deanwalston/images/atlfriends.jpeg" height="250" alt="Friends in Atlanta" />
161+
162+
<h3>Favorite Sports Teams ⚾🏈</h3>
163+
<img src="/lesson_00/deanwalston/images/atlanta-braves-olson-celebrates-riley-acunajr.jpg" height="200" alt="Atlanta Braves" />
164+
<img src="/lesson_00/deanwalston/images/broncosdbs.webp" height="200" alt="Broncos" />
165+
166+
<h3>🍖 On the Grill, Tailgate Vibes</h3>
167+
<img src="/lesson_00/deanwalston/images/tailgate.jpeg" height="300" alt="Tailgate" />
168+
<img src="/lesson_00/deanwalston/images/steak.jpeg" height="300" alt="Grilling" />
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Markdown to HTML Converter
2+
3+
## 📜 Overview
4+
This Python script converts a Markdown (`.md`) file into a fully formatted HTML (`.html`) file.
5+
It uses the [`markdown`](https://pypi.org/project/Markdown/) library to parse and convert Markdown syntax into HTML and wraps it in a basic HTML template.
6+
7+
This is useful for:
8+
- Quickly previewing Markdown documents in a browser.
9+
- Creating static HTML pages from Markdown notes or documentation.
10+
- Converting `.md` files without manually copying and pasting into online tools.
11+
12+
---
13+
14+
## 🛠 Features
15+
- Reads a Markdown file and converts it to HTML.
16+
- Wraps the HTML in a basic structure (`<html>`, `<head>`, `<body>`).
17+
- Links to an optional external CSS file (`style.css`) for custom styling.
18+
- Handles file-not-found and unexpected errors gracefully.
19+
20+
---
21+
22+
## 📦 Installation
23+
24+
25+
1. **Install Python (if not already installed)**
26+
- [Download Python]( brew install python ) (version 3+ recommended).
27+
- Verify by. python3 --version
28+
29+
30+
2. **(Optional)Create and Activate a Virtual Environment**
31+
Using a virtual environment ensures dependencies are isolated from your global Python installation.
32+
33+
**On macOS:**
34+
```bash
35+
python3 -m venv venv
36+
source venv/bin/activate
37+
```
38+
3. **Install dependencies**
39+
The script uses the `markdown` and `os`library. Install it via:
40+
```
41+
python -m pip install markdown
42+
43+
import os
44+
```
45+
46+
---
47+
48+
## ▶️ Usage
49+
50+
1. Place your Markdown file (e.g., `my_doc.md`) in the same directory as the script or note its full path.
51+
52+
2. Run the script:
53+
```
54+
python convert_markdown_file_to_html.py
55+
```
56+
57+
3. When prompted, enter the path to your Markdown file:
58+
```
59+
Enter the path to the Markdown file: my_doc.md
60+
```
61+
62+
4. The converted HTML file will then be saved in the same location as your Markdown file, with the `.html` extension.
63+
64+
---
65+
66+
## Tech Used
67+
68+
- HTML, CSS
69+
- Pyhton
70+
- GitHub Markdown CSS
71+
72+
## ⚠️ Error Handling
73+
- If the file path is incorrect, the script will display:
74+
```
75+
Error: File not found at 'your_file.md'
76+
```
77+
- Any other unexpected errors will be printed to the console.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Markdown to HTML</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<h1>Welcome to My Page</h1>
11+
<p>This is a sample Markdown document.</p>
12+
<ul>
13+
<li>Item 1</li>
14+
<li>Item 2</li>
15+
</ul>
16+
<p><strong>Bold Text</strong> and <em>Italic Text</em>
17+
"""</p>
18+
</body>
19+
</html>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Welcome to My Page
2+
3+
This is a sample Markdown document.
4+
5+
- Item 1
6+
- Item 2
7+
8+
**Bold Text** and *Italic Text*
9+
"""
10+

lesson_01/deanwalston/style.css

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.markdown-body {
2+
box-sizing: border-box;
3+
min-width: 200px;
4+
max-width: 980px;
5+
margin: 0 auto;
6+
padding: 45px;
7+
}
8+
9+
@media (max-width: 767px) {
10+
.markdown-body {
11+
padding: 15px;
12+
}
13+
}
14+
15+
body {
16+
font-family: Arial, sans-serif, Helvetica;
17+
line-height: 1.6;
18+
margin: 20px;
19+
color: #333;
20+
}
21+
h1, h2, h3, h4 {
22+
color: #2c3e50;
23+
}
24+
h1 {
25+
font-size: 2.5em;
26+
}
27+
h2 {
28+
font-size: 2em;
29+
}
30+
h3 {
31+
font-size: 1.5em;
32+
}
33+
h4 {
34+
font-size: 1.2em;
35+
}
36+
ul {
37+
list-style-type: none;
38+
padding: 0;
39+
}
40+
li {
41+
margin: 5px 0;
42+
list-style-type: circle;
43+
list-style-position: inside;
44+
padding-left: 40px;
45+
}
46+
img {
47+
margin: 10px 0;
48+
border-radius: 8px;
49+
}
50+
blockquote {
51+
font-style: italic;
52+
color: #7f8c8d;
53+
border-left: 4px solid #2c3e50;
54+
padding-left: 10px;
55+
margin: 20px 0;
56+
}

0 commit comments

Comments
 (0)